WordPress.org

Making WordPress.org

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#1928 closed enhancement (fixed)

Underscores not appearing in SyntaxHighlighter

Reported by: hardeepasrani Owned by: coffee2code
Milestone: Priority: normal
Component: Developer Hub Keywords: has-patch has-screenshots dev-feedback
Cc:

Description

Example: https://developer.wordpress.org/themes/functionality/custom-headers/

Using Firefox, the underscores aren't appearing in the last line inside the syntax highlighter (screenshot attached). Adding a padding of 0.5rem makes it visible.

Attachments (2)

main.css.diff (776 bytes) - added by hardeepasrani 3 years ago.
Initial diff.
Syntax Highlighter.png (10.8 KB) - added by hardeepasrani 3 years ago.
Comparison.

Download all attachments as: .zip

Change History (12)

@hardeepasrani
3 years ago

Initial diff.

@hardeepasrani
3 years ago

Comparison.

This ticket was mentioned in Slack in #docs by hardeepasrani. View the logs.


3 years ago

#2 follow-up: @Kenshino
3 years ago

  • Keywords has-patch has-screenshots dev-feedback added
  • Type changed from defect to enhancement

Don't use !important unless it's really necessary. Use better selectors

#3 in reply to: ↑ 2 ; follow-up: @hardeepasrani
3 years ago

Replying to Kenshino:

Don't use !important unless it's really necessary. Use better selectors

Plugin's stylesheet is already using !important so better selectors won't do any good.

#4 in reply to: ↑ 3 @Kenshino
3 years ago

Replying to hardeepasrani:

Replying to Kenshino:

Don't use !important unless it's really necessary. Use better selectors

Plugin's stylesheet is already using !important so better selectors won't do any good.

:(

This ticket was mentioned in Slack in #meta-devhub by drew. View the logs.


3 years ago

#6 @Viper007Bond
3 years ago

Yeah, the highlighting library that my plugin uses has !important to avoid being overridden by themes and such. This is one of the rare cases where it actually makes sense to use it (for the most part).

#7 @coffee2code
3 years ago

  • Owner set to coffee2code
  • Resolution set to fixed
  • Status changed from new to closed

In 3853:

developer.wordpress.org: Add slight padding-bottom to syntax highlighted code container.

Fixes edge cases where underscores in the last line of syntax highlighted code get clipped.

Props hardeepasrani.
Fixes #1928.

#8 @hardeepasrani
3 years ago

Thanks. :)

This ticket was mentioned in Slack in #meta-devhub by coffee2code. View the logs.


3 years ago

This ticket was mentioned in Slack in #docs by hardeepasrani. View the logs.


3 years ago

Note: See TracTickets for help on using tickets.