-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update beautify-css.js for LESS @var and &: parent reference
- Loading branch information
1 parent
56f7441
commit e4d969e
Showing
4 changed files
with
96 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2291,6 +2291,32 @@ function run_beautifier_tests(test_obj, Urlencoded, js_beautify, html_beautify, | |
*/ | ||
btc("@font-face {\n\tfont-family: 'Bitstream Vera Serif Bold';\n\tsrc: url('http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf');\n}\n@media screen {\n\t#foo:hover {\n\t\tbackground-image: url(foo.png);\n\t}\n\t@media screen and (min-device-pixel-ratio: 2) {\n\t\t@font-face {\n\t\t\tfont-family: 'Helvetica Neue'\n\t\t}\n\t\t#foo:hover {\n\t\t\tbackground-image: url([email protected]);\n\t\t}\n\t}\n}"); | ||
|
||
// less-css cases | ||
btc('.well{@well-bg:@bg-color;@well-fg:@fg-color;}','.well {\n\t@well-bg: @bg-color;\n\t@well-fg: @fg-color;\n}'); | ||
btc('.well {&.active {\nbox-shadow: 0 1px 1px @border-color, 1px 0 1px @border-color;}}', | ||
'.well {\n' + | ||
'\t&.active {\n' + | ||
'\t\tbox-shadow: 0 1px 1px @border-color, 1px 0 1px @border-color;\n' + | ||
'\t}\n' + | ||
'}'); | ||
btc('a {\n' + | ||
'\tcolor: blue;\n' + | ||
'\t&:hover {\n' + | ||
'\t\tcolor: green;\n' + | ||
'\t}\n' + | ||
'\t& & &&&.active {\n' + | ||
'\t\tcolor: green;\n' + | ||
'\t}\n' + | ||
'}'); | ||
|
||
// Not sure if this is sensible | ||
// but I believe it is correct to not remove the space in "&: hover". | ||
btc('a {\n' + | ||
'\t&: hover {\n' + | ||
'\t\tcolor: green;\n' + | ||
'\t}\n' + | ||
'}'); | ||
|
||
// test options | ||
opts.indent_size = 2; | ||
opts.indent_char = ' '; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters