-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Replace multi-line comment with single line comments #2827
Conversation
When using Compass to compile the sass files, mulit-line comments are not stripped in the output, causing malformed CSS output.
I'm okay with changing the single line comments to use |
Compass will ignore stripping multi-line comments and output them in the final CSS. The problem really come from multi-line comments in CSS class definitions. Single line comments are stripped by compass during compilation. Can we agree to replace multi-line comments inside CSS definitions with single line comments? If so, I can update the pull request. Updated to include a link to Sass documentation on comments. |
Can you open an issue against compass regarding this? They should strip out comments that won't be valid in pure css. I'll pull it in then with the change for those. |
It isn't Compass doing it, it's Sass. I don't think it's a bug in Sass, either. It may be a Chrome bug because it sees that commented out CSS property as an actual CSS property. |
I did a test. The following SCSS has its comment preserved, but shows no issues in the Chrome dev tools: .video-js {
/*
baz baz baz baz
bar bar bar bar
*/
display: block;
} But this shows the behavior in the attached screenshot: .video-js {
/*
display: inline
baz baz baz baz
bar bar bar bar
*/
display: block;
} |
Yeah, I just looked at videojs's css and the comments are preserved. Though, it's still working fine. |
I don't believe it's a Compass issue either. Sass states it will ignore multi-line comments. I wonder if it's chrome picking up the |
Either way, if it's a Sass, Compass or browser issue, is it necessary to output the comments in the compiled CSS? They remain in the .scss files for the developer. To help make the web faster it would reduce final output by allowing single line comments to be stripped. |
FWIW, the comments do get stripped in |
I think I know what the exactly issue here. I looked through the changes and I think so of the things can just be moved outside of the blocks. The things that should stay inside the block can be changed to single line comments. I'll go through and make comments about it. |
/* If we let the font size grow as much as everything else, the current time tooltip ends up | ||
ginormous. If you'd like to enable the current time tooltip all the time, this should be disabled | ||
to avoid a weird hitch when you roll off the hover. */ | ||
// If we let the font size grow as much as everything else, the current time tooltip ends up |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this out of the block
@nick11703 if you make the changes discussed, I'll pull it in. Thanks! |
@gkatsev No problem. I'll work on that soon. Thanks. |
@nick11703 hey, did you get a chance to go through and update the comments? (Looks like this also needs a rebase). |
@gkatsev Sorry. Got caught up with the holidays. It's in my plans for today. |
# Conflicts: # src/css/components/menu/_menu-popup.scss
@gkatsev This should be good to go now. Let me know if you need anything else. |
LGTM |
LGTM |
* upstream/stable: (479 commits) v5.4.4 @gkatsev switched to use custom vtt.js from npm. closes videojs#2905 v5.4.3 @gkatsev updated options customizer and github-release options. closes videojs#2903 v5.4.2 @gkatsev updated grunt-release config. closes videojs#2900 v5.4.1 @gkatsev added chg- and github- release for next releases. closes videojs#2899 v5.4.0 @gkatsev added ability to release next tag from master. closes videojs#2894 @gkatsev added nullcheck for cues in updateForTrack. Fixes videojs#2870. closes videojs#2896 @chemoish emulated HTMLTrackElement to enable track load events. closes videojs#2804 @gkatsev added a Player#reset method. Fixes videojs#2852. closes videojs#2880 @nick11703 changed multiline comments in sass with single-line comments. closes videojs#2827 @gkatsev added Player#tech. Fixes videojs#2617. closes videojs#2883 @misteroneill updated videojs-ie8 to 1.1.1. closes videojs#2869 v5.3.0 @imbcmdth added sourceOrder option for source-first ordering in selectSource. closes videojs#2847 @forbesjo updated formatTime to not go negative. closes videojs#2821 v5.2.4 ...
When using Compass to compile the sass files, mulit-line comments are
not stripped in the output, causing malformed CSS output.
Example
Chrome's interpretation of the CSS