CSSHelp Features and Bugs
See original GitHub issueReason for this issue:
- Documenting quirks and issues with the CSSHelp class
Quirks (will not fix)
- Testing in JSDOM results in whitespace formatting being taken through to computed values. Example
- Colour values are computed into
rgb
. Example:#000
->rgb(0, 0, 0)
- Note: Named colours are not computed. Example:
red
->red
- Note: Named colours are not computed. Example:
- Custom CSS variable property values are not computed. Example:
#000
->#000
- Custom CSS variable property values come with untrimmed whitespace. Example:
CSSHelp(document).getStyleDeclaration('selector')?.getPropertyValue('--custom-variable') === " #000"
Bugs (will fix)
- Safari does not have
<CSSMediaRule>.conditionText
. Ref: https://github.com/freeCodeCamp/freeCodeCamp/issues/42354#issuecomment-854505895- Will likely only rely on
media.mediaText
property, asconditionText
is computed from this.
- Will likely only rely on
Feature Requests 🤷♂️
- Calculated values can contain whitespace (not
\t\r\n
). Example:
selector {
background: linear-gradient( var(--building-color1 ) ,
var(--window-color1)
);
getStyleDeclaration('selector')?.background === "linear-gradient( var(--building-color1 ) , var(--window-color1) )"
- This helper should be able to select out only the CSS defined in the editor, but testing needs to be done to confirm external stylesheets will not end up being selected. (related: #42356 )
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (9 by maintainers)
Top Results From Across the Web
448640 – [CSS] [Help] org.eclipse.e4.ui.css.swt.theme ... - Bugs
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became...
Read more >How To Effectively Debug CSS | Bug Tracking Blog @ Bird ...
This article will explore some fundamental CSS concepts to help you know what to look for when you encounter CSS bugs and avoid...
Read more >CSS Help Pile - Artypapers
CSS Showcase Sites Showing off great CSS design. Browser Bugs How to work with the browser working against you. CSS Literature CSS &...
Read more >What is a bug (computer bug)? - TechTarget
Sometimes referred to as calculation errors, arithmetic bugs are math errors in code that cause it not to function. Interface. An interface bug...
Read more >How to Effectively Prioritize Bug Fixes vs Product Features?
When it comes to prioritizing bug fixes vs. new features for your next application update, Product Managers are faced with incredibly difficult choices....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@moT01 The only thing I would want done is this helper should be able to ignore external stylesheets (e.g. Darkmode Browser Extensions), but will require some tinkering, and potentially adding something unique to the
styles
appended to the iframe.Short: I would like this to stay open, for now. What needs to change is: https://github.com/freeCodeCamp/freeCodeCamp/blob/5de0aae5da35927042a8ad5565b6b7eca0a95338/client/src/utils/css-help.ts#L95-L103
🙌