Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix dracula li markers #3464

Merged

Conversation

t-fritsch
Copy link
Collaborator

@t-fritsch t-fritsch commented Sep 2, 2023

when working on my presentation I noticed that dracula.css was modified because sass file hasn't been altered in #3450 (only the built css file has been edited)

At first this PR aimed only to simply apply the same patch to the sass file to make it match the compiled version, but then I noticed that dracula's way to render <li> marker was by adding :before pseudo elements resulting in always the same bullet point, whatever nesting level it was into (always a disc). In other themes, the li renders differently depending on the nesting level (disc, square, circle).

By replacing :before pseudo elements with ::marker selector, we can have the same style as in other themes :
dracula-list-item-comparison

from left to right : before this PR / PR / original "dark" theme for comparison

NB: The bullets are now bigger than before this PR, but it is consistent with other themes. If one prefers smaller markers, it can be done in custom CSS :

.reveal ul li::marker {
    font-size: 70%; /* or whatever scale fits */
}

replace :before pseudo elements with :marker selector

allows to have different marker based on the level of nesting (as in other themes : disc, square, circle)
@t-fritsch
Copy link
Collaborator Author

Just noticed there is a regression on ol numbering. Will fix before marking ready for review.

@t-fritsch
Copy link
Collaborator Author

fixed ol numbering
dracula-fix-li-numbering

did some sass syntax optimization too (remove duplicate .reveal selectors)

@t-fritsch t-fritsch marked this pull request as ready for review September 2, 2023 10:23
@hakimel hakimel merged commit 03fe25c into hakimel:master Sep 4, 2023
@hakimel
Copy link
Owner

hakimel commented Sep 4, 2023

Oops, completely missed that that #3450 only changed the source files.

Thanks for catching that and for making the styles consistent with other themes.

@t-fritsch
Copy link
Collaborator Author

my pleasure !

@t-fritsch t-fritsch deleted the fix-dracula-theme-li-marker-colors branch September 4, 2023 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants