I have a WordPress site with a twentysixteen child theme where I am trying to sharpen certain things. One of the things I want is to make the sidebar less of a speed bump to ideally have the visitor's attention focused on reading the content most of the time.
Some links are underlined on UX motivations. (Embedded links are underlined; lists of links are only underlined on hover.) So second column widgets besides search are candidates to have links usually not be underlined.
What I have, after something like a dozen attempts, is as follows. The stylesheet mostly treats all right column widgets after search as being the same for link underline.
In the UI, if you look at the right column, excluding a widget used to display a column of images:
The 1st and 3rd widgets, excluding a column of book covers, have links underlined,
The 2nd and 4th do not.
The 1st, 2nd, and 3rd use arbitrary text widget.
I've jumped the shark in debugging.
I've spent hours turning things on and off in the style.css, adding and subtracting "text-decoration: none,"
"text-decoration: underline,"
"!important,"
etc., and nothing worked.
The snippet below uses the heaviest sledgehammer I could find. The effect I expected would be that I was assigning a (jQuery.css()) inline !important
style, and that simply couldn't be trumped.
;(jQuery(function()
{
jQuery.css('aside#secondary a', 'text-decoration: none !important');
jQuery.css(
'aside#secondary a:hover', 'text-decoration: underline !important');
})());
I tried in a site JavaScript file and temporarily added the script to footer.php. Nothing. I still have not managed to get the underlines to go away.
I haven't found out what is causing it; I've tried hard enough but am not near to being able to provide a minimal demonstration of the issue; I don't know WordPress's guts.
Thanks,
The issue is that apparently the underline is achieved not with the text-decoration: underline
css property but with the box-shadow: 0 1px 0 0 currentColor
.
Try override it as follows with css or js:
box-shadow: none;
Let me know if it helps,