Skip to content

fancylist inject class remove semicolon#2464

Merged
facelessuser merged 1 commit intofacelessuser:mainfrom
joapuiib:feature/fancylists-fix-semicolon
Sep 22, 2024
Merged

fancylist inject class remove semicolon#2464
facelessuser merged 1 commit intofacelessuser:mainfrom
joapuiib:feature/fancylists-fix-semicolon

Conversation

@joapuiib
Copy link
Contributor

Removes the semicolon at the end of the injected class in fancylists.

@gir-bot gir-bot added S: needs-review Needs to be reviewed and/or approved. C: source Related to source code. C: tests Related to testing. labels Sep 22, 2024
@facelessuser
Copy link
Owner

I don't view this as a problem that needs fixing as much as a subjective user preference.

@joapuiib
Copy link
Contributor Author

Oh, I assumed it was a typo. I've never seen semicolons in HTML classes.

Isn't more common not to use them?

@facelessuser
Copy link
Owner

facelessuser commented Sep 22, 2024

Oh, I assumed it was a typo.

No, not a typo, but I honestly don't have strong feelings either way. It seemed like it was stated as a problem, but I don't think it really matters.

Isn't more common not to use them?

It wouldn't surprise me if one was somewhat more popular than others. I know people that have definite preferences for or against them at the end.

I don't know what the split on preference is. I think at some point it used to be required, but I think these days most browsers are more forgiving. If you go online, you'll often see it taught to always add the ; probably because it used to be needed, but yeah, I know there are people who don't add them and I've probably left them off at times myself. This is probably the most thought I've put into the significance of trailing semicolons in inline styles 🙃.

I guess my point is I don't really care it's there or not, but I guess I'm not against removing it either 🤷🏻.

@joapuiib
Copy link
Contributor Author

joapuiib commented Sep 22, 2024

This is probably the most thought I've put into the significance of trailing semicolons in inline styles 🙃.

I get why you have implemented that way in the style attribute, but I'm talking about setting the element class attribute, not style.

<ol class="fancylists-lower-alpha;" type="a">
  <li>List item</li>
</ol>

With the current implementation, CSS selector should be .fancylists-lower-alpha\; instead of .fancylists-lower-alpha.

Example:

.fancylists-lower-alpha\; li::marker {
    content: counter(list-item, lower-alpha) ") ";
}
.fancylists-upper-alpha\; li::marker {
    content: counter(list-item, upper-alpha) ") ";
}

Instead of:

.fancylists-lower-alpha li::marker {
    content: counter(list-item, lower-alpha) ") ";
}
.fancylists-upper-alpha li::marker {
    content: counter(list-item, upper-alpha) ") ";
}

@facelessuser
Copy link
Owner

Oh, a semicolon in the class?! Oh, that is definitely a typo.

@facelessuser
Copy link
Owner

I completely missed that

@facelessuser
Copy link
Owner

@gir-bot lgtm

@gir-bot gir-bot added S: approved The pull request is ready to be merged. and removed S: needs-review Needs to be reviewed and/or approved. labels Sep 22, 2024
@facelessuser facelessuser merged commit dee67da into facelessuser:main Sep 22, 2024
@joapuiib
Copy link
Contributor Author

Sorry for the misunderstanding. I should have written a better PR text.

Thanks!

@facelessuser
Copy link
Owner

I should have looked over the review closer 😅

@facelessuser
Copy link
Owner

@joapuiib joapuiib deleted the feature/fancylists-fix-semicolon branch October 9, 2024 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C: source Related to source code. C: tests Related to testing. S: approved The pull request is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants