I know we’ve talked about this before, but your mention of ctrl-clicking a class reminded me I’m still seeing this problem:
If I ctrl-click on a class in a div (such as the "ack" below) I am taken to the top of the stylesheet, as if it couldn’t find the class. This is most likely due to my use of descendent combinators. I usually have a default <div> style with custom styling for items within the <div>. eg. div.blio p {}
Code:
HTML:
<div class="ack">
<h2>Acknowledgments</h2>
<p>I have no idea why this isn't working......</p>
<p>yadda yadda</p>
</div>
CSS:
/* Division section styles */
/* Default */
div {
text-indent: 0;
margin: 2em;
}
/* Custom */
div.ack p {
margin: 0 0 0.5em;
font-size: 1.15em;
text-align: left;
text-indent: 0;
}
div.copy p {
margin: 0 0 0.75em;
font-size: 0.85em;
text-align: center;
text-indent: 0;
}
div.blio p {
margin: 0 0 0.5em;
font-size: 1em;
text-align: center;
font-style: italic;
text-indent: 0;
}
Is it possible to add another option before defaulting to the top of the sheet?
Code:
1) Find the class by itself on stylesheet and go there
2) Find the class as part of a combinator and go to the first instance
3) If unfound, goto top of stylesheet
Edit: Just to be clear - ctrl-click on a class will work properly if/when I explicitly define the class:
Code:
HTML:
<div class="invite">
<p class="title">Her Royal Majesty Queen Amidalla</p>
<p>cordially invites you to fix this on 25 Dec 2023.</p>
<p>If you fail, you will surely be declaring for the dark-side and
shall be hunted down and squished like a bug!</p> /*get it - a bug - :D*/
</div>
CSS:
div.invite {
margin: 2em;
width: fit-content;
max-width: 95%;
}
div.invite p {
margin-bottom: 0.5em;
font-size: 1em;
text-indent: 0;
font-family: "Monotype Corsiva", "cursive", serif;
font-style: italic;
}