LessException
.
27 | *
28 | * @param cause The cause.
29 | */
30 | public LessException(Throwable cause) {
31 | super(cause);
32 | }
33 |
34 | /**
35 | * Constructs a new LessException
.
36 | *
37 | * @param message The message.
38 | * @param cause The cause.
39 | */
40 | public LessException(String message, Throwable cause) {
41 | super(message, cause);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/main/java/org/lesscss/Resource.java:
--------------------------------------------------------------------------------
1 | package org.lesscss;
2 |
3 | import java.io.IOException;
4 | import java.io.InputStream;
5 |
6 | /**
7 | * LESS resource interface.
8 | *
9 | * Abstracts {@link LessSource} from resource access technology. Makes it possible to load LESS resources from files, 10 | * classpath resource, URL, etc.
11 | * 12 | * @author Anton Pechinsky 13 | */ 14 | public interface Resource { 15 | 16 | /** 17 | * Tests if resource exists. 18 | * 19 | * @return true if resource exists. 20 | */ 21 | boolean exists(); 22 | 23 | /** 24 | * Returns the time that the LESS source was last modified. 25 | * 26 | * @return Along
value representing the time the resource was last modified, measured in milliseconds
27 | * since the epoch (00:00:00 GMT, January 1, 1970).
28 | */
29 | long lastModified();
30 |
31 | /**
32 | * Returns resource input stream.
33 | *
34 | * @throws IOException
35 | */
36 | InputStream getInputStream() throws IOException;
37 |
38 | /**
39 | * Creates relative resource for current resource.
40 | *
41 | * @param relativeResourcePath String relative resource path
42 | * @return Resource relative resource
43 | */
44 | Resource createRelative(String relativeResourcePath) throws IOException;
45 |
46 | /**
47 | * Returns a unique name for this resource. (ie file name for files)
48 | *
49 | * @return the name of the resource
50 | */
51 | String getName();
52 | }
53 |
--------------------------------------------------------------------------------
/src/main/java/org/lesscss/logging/JULILessLoggerProvider.java:
--------------------------------------------------------------------------------
1 | package org.lesscss.logging;
2 |
3 | import java.util.logging.Level;
4 | import java.util.logging.Logger;
5 |
6 | class JULILessLoggerProvider implements LessLoggerProvider {
7 | public LessLogger getLogger(Class> clazz) {
8 | return new JULILessLogger(Logger.getLogger(clazz.getName()));
9 | }
10 |
11 | private static class JULILessLogger implements LessLogger {
12 | private final Logger logger;
13 |
14 | private JULILessLogger(Logger logger) {
15 | this.logger = logger;
16 | }
17 |
18 | public boolean isDebugEnabled() {
19 | return logger.isLoggable(Level.FINE);
20 | }
21 |
22 | public boolean isInfoEnabled() {
23 | return logger.isLoggable(Level.INFO);
24 | }
25 |
26 | public void debug(String msg) {
27 | logger.fine(msg);
28 | }
29 |
30 | public void debug(String format, Object... args) {
31 | if( isDebugEnabled() ) {
32 | logger.fine( String.format(format, args) );
33 | }
34 | }
35 |
36 | public void info(String msg) {
37 | logger.info(msg);
38 | }
39 |
40 | public void info(String format, Object... args) {
41 | if( isInfoEnabled() ) {
42 | logger.info(String.format(format,args));
43 | }
44 | }
45 |
46 | public void error(String msg, Throwable t) {
47 | logger.log(Level.SEVERE, msg, t);
48 | }
49 |
50 | public void error(String format, Object... args) {
51 | logger.severe(String.format(format,args));
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/src/main/java/org/lesscss/logging/LessLogger.java:
--------------------------------------------------------------------------------
1 | package org.lesscss.logging;
2 |
3 | public interface LessLogger {
4 | boolean isDebugEnabled();
5 |
6 | boolean isInfoEnabled();
7 |
8 | void debug(String msg);
9 |
10 | void debug(String format, Object... args);
11 |
12 | void info(String msg);
13 |
14 | void info(String format, Object... args);
15 |
16 | void error(String msg, Throwable t);
17 |
18 | void error(String format, Object... args);
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/src/main/java/org/lesscss/logging/LessLoggerFactory.java:
--------------------------------------------------------------------------------
1 | package org.lesscss.logging;
2 |
3 | public class LessLoggerFactory {
4 | private static LessLoggerFactory instance = new LessLoggerFactory();
5 | private LessLoggerProvider loggerProvider;
6 |
7 | private LessLoggerFactory() {
8 | try {
9 | Class.forName("org.slf4j.Logger");
10 | loggerProvider = new SLF4JLessLoggerProvider();
11 | } catch(ClassNotFoundException ex) {
12 | loggerProvider = new JULILessLoggerProvider();
13 | }
14 | }
15 |
16 | public static LessLogger getLogger(Class> clazz) {
17 | return instance.loggerProvider.getLogger(clazz);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/org/lesscss/logging/LessLoggerProvider.java:
--------------------------------------------------------------------------------
1 | package org.lesscss.logging;
2 |
3 | interface LessLoggerProvider {
4 | LessLogger getLogger(Class> clazz);
5 | }
6 |
--------------------------------------------------------------------------------
/src/main/java/org/lesscss/logging/SLF4JLessLoggerProvider.java:
--------------------------------------------------------------------------------
1 | package org.lesscss.logging;
2 |
3 | class SLF4JLessLoggerProvider implements LessLoggerProvider {
4 | public LessLogger getLogger(Class> clazz) {
5 | return new SLF4JLessLogger(org.slf4j.LoggerFactory.getLogger(clazz));
6 | }
7 |
8 | private static class SLF4JLessLogger implements LessLogger {
9 | private final org.slf4j.Logger logger;
10 |
11 | private SLF4JLessLogger(org.slf4j.Logger logger) {
12 | this.logger = logger;
13 | }
14 |
15 | public boolean isDebugEnabled() {
16 | return logger.isDebugEnabled();
17 | }
18 |
19 | public boolean isInfoEnabled() {
20 | return logger.isInfoEnabled();
21 | }
22 |
23 | public void debug(String msg) {
24 | logger.debug(msg);
25 | }
26 |
27 | public void debug(String format, Object... args) {
28 | if( logger.isDebugEnabled() ) {
29 | logger.debug(String.format(format, args));
30 | }
31 | }
32 |
33 | public void info(String msg) {
34 | logger.info(msg);
35 | }
36 |
37 | public void info(String format, Object... args) {
38 | if( logger.isInfoEnabled() ) {
39 | logger.info( String.format(format, args) );
40 | }
41 | }
42 |
43 | public void error(String msg, Throwable t) {
44 | logger.error(msg, t);
45 | }
46 |
47 | public void error(String format, Object... args) {
48 | if( logger.isErrorEnabled() ) {
49 | logger.error( String.format(format, args) );
50 | }
51 | }
52 |
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/src/main/java/org/lesscss/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides classes for compiling LESS sources.
3 | */
4 | package org.lesscss;
--------------------------------------------------------------------------------
/src/main/javadoc/stylesheet.css:
--------------------------------------------------------------------------------
1 | /* Javadoc style sheet */
2 | /* Author: Doug Kramer */
3 | /* Purpose: For use with Sun Javadoc tool, to define colors, fonts and other style attributes for Google look */
4 | /* Apply by specifying javadoc option "-stylesheetfile dev_javadoc.css" */
5 |
6 | body {
7 | font-family: arial, sans-serif;
8 | background-color:#fff;
9 | font-size: small;
10 | margin: 3px 8px 8px 8px; /* Increasing top margin moves "All Classes" down in lower left frame, */
11 | color:#000; /* but unnecessarily moves increases gap in other 2 frames */
12 | }
13 |
14 | /* Needed to turn off "border=1" */
15 | table {
16 | border: none;
17 | border-collapse: collapse;
18 | }
19 |
20 | /* Need "th" to bypass "bgcolor" embedded in and elements
3 | // --------------------------------------------------------
4 |
5 | // Inline and block code styles
6 | code,
7 | pre {
8 | padding: 0 3px 2px;
9 | #font > #family > .monospace;
10 | font-size: @baseFontSize - 1;
11 | color: @grayDark;
12 | .border-radius(3px);
13 | }
14 |
15 | // Inline code
16 | code {
17 | padding: 2px 4px;
18 | color: #d14;
19 | background-color: #f7f7f9;
20 | border: 1px solid #e1e1e8;
21 | }
22 |
23 | // Blocks of code
24 | pre {
25 | display: block;
26 | padding: (@baseLineHeight - 1) / 2;
27 | margin: 0 0 @baseLineHeight / 2;
28 | font-size: @baseFontSize * .925; // 13px to 12px
29 | line-height: @baseLineHeight;
30 | background-color: #f5f5f5;
31 | border: 1px solid #ccc; // fallback for IE7-8
32 | border: 1px solid rgba(0,0,0,.15);
33 | .border-radius(4px);
34 | white-space: pre;
35 | white-space: pre-wrap;
36 | word-break: break-all;
37 | word-wrap: break-word;
38 |
39 | // Make prettyprint styles more spaced out for readability
40 | &.prettyprint {
41 | margin-bottom: @baseLineHeight;
42 | }
43 |
44 | // Account for some code outputs that place code tags in pre tags
45 | code {
46 | padding: 0;
47 | color: inherit;
48 | background-color: transparent;
49 | border: 0;
50 | }
51 | }
52 |
53 | // Enable scrollable blocks of code
54 | .pre-scrollable {
55 | max-height: 340px;
56 | overflow-y: scroll;
57 | }
--------------------------------------------------------------------------------
/src/test/resources/bootstrap/less/component-animations.less:
--------------------------------------------------------------------------------
1 | // COMPONENT ANIMATIONS
2 | // --------------------
3 |
4 | .fade {
5 | .transition(opacity .15s linear);
6 | opacity: 0;
7 | &.in {
8 | opacity: 1;
9 | }
10 | }
11 |
12 | .collapse {
13 | .transition(height .35s ease);
14 | position:relative;
15 | overflow:hidden;
16 | height: 0;
17 | &.in {
18 | height: auto;
19 | }
20 | }
--------------------------------------------------------------------------------
/src/test/resources/bootstrap/less/dropdowns.less:
--------------------------------------------------------------------------------
1 | // DROPDOWN MENUS
2 | // --------------
3 |
4 | // Use the .menu class on any
- element within the topbar or ul.tabs and you'll get some superfancy dropdowns
5 | .dropdown {
6 | position: relative;
7 | }
8 | .dropdown-toggle {
9 | // The caret makes the toggle a bit too tall in IE7
10 | *margin-bottom: -3px;
11 | }
12 | .dropdown-toggle:active,
13 | .open .dropdown-toggle {
14 | outline: 0;
15 | }
16 |
17 | // Dropdown arrow/caret
18 | // --------------------
19 | .caret {
20 | display: inline-block;
21 | width: 0;
22 | height: 0;
23 | vertical-align: top;
24 | border-left: 4px solid transparent;
25 | border-right: 4px solid transparent;
26 | border-top: 4px solid @black;
27 | .opacity(30);
28 | content: "";
29 | }
30 |
31 | // Place the caret
32 | .dropdown .caret {
33 | margin-top: 8px;
34 | margin-left: 2px;
35 | }
36 | .dropdown:hover .caret,
37 | .open.dropdown .caret {
38 | .opacity(100);
39 | }
40 |
41 | // The dropdown menu (ul)
42 | // ----------------------
43 | .dropdown-menu {
44 | position: absolute;
45 | top: 100%;
46 | left: 0;
47 | z-index: @zindexDropdown;
48 | float: left;
49 | display: none; // none by default, but block on "open" of the menu
50 | min-width: 160px;
51 | padding: 4px 0;
52 | margin: 0; // override default ul
53 | list-style: none;
54 | background-color: @dropdownBackground;
55 | border-color: #ccc;
56 | border-color: rgba(0,0,0,.2);
57 | border-style: solid;
58 | border-width: 1px;
59 | .border-radius(0 0 5px 5px);
60 | .box-shadow(0 5px 10px rgba(0,0,0,.2));
61 | -webkit-background-clip: padding-box;
62 | -moz-background-clip: padding;
63 | background-clip: padding-box;
64 | *border-right-width: 2px;
65 | *border-bottom-width: 2px;
66 |
67 | // Aligns the dropdown menu to right
68 | &.pull-right {
69 | right: 0;
70 | left: auto;
71 | }
72 |
73 | // Dividers (basically an hr) within the dropdown
74 | .divider {
75 | .nav-divider();
76 | }
77 |
78 | // Links within the dropdown menu
79 | a {
80 | display: block;
81 | padding: 3px 15px;
82 | clear: both;
83 | font-weight: normal;
84 | line-height: @baseLineHeight;
85 | color: @dropdownLinkColor;
86 | white-space: nowrap;
87 | }
88 | }
89 |
90 | // Hover state
91 | // -----------
92 | .dropdown-menu li > a:hover,
93 | .dropdown-menu .active > a,
94 | .dropdown-menu .active > a:hover {
95 | color: @dropdownLinkColorHover;
96 | text-decoration: none;
97 | background-color: @dropdownLinkBackgroundHover;
98 | }
99 |
100 | // Open state for the dropdown
101 | // ---------------------------
102 | .dropdown.open {
103 | // IE7's z-index only goes to the nearest positioned ancestor, which would
104 | // make the menu appear below buttons that appeared later on the page
105 | *z-index: @zindexDropdown;
106 |
107 | .dropdown-toggle {
108 | color: @white;
109 | background: #ccc;
110 | background: rgba(0,0,0,.3);
111 | }
112 | .dropdown-menu {
113 | display: block;
114 | }
115 | }
116 |
117 | // Right aligned dropdowns
118 | .pull-right .dropdown-menu {
119 | left: auto;
120 | right: 0;
121 | }
122 |
123 | // Allow for dropdowns to go bottom up (aka, dropup-menu)
124 | // ------------------------------------------------------
125 | // Just add .dropup after the standard .dropdown class and you're set, bro.
126 | // TODO: abstract this so that the navbar fixed styles are not placed here?
127 | .dropup,
128 | .navbar-fixed-bottom .dropdown {
129 | // Reverse the caret
130 | .caret {
131 | border-top: 0;
132 | border-bottom: 4px solid @black;
133 | content: "\2191";
134 | }
135 | // Different positioning for bottom up menu
136 | .dropdown-menu {
137 | top: auto;
138 | bottom: 100%;
139 | margin-bottom: 1px;
140 | }
141 | }
142 |
143 | // Typeahead
144 | // ---------
145 | .typeahead {
146 | margin-top: 2px; // give it some space to breathe
147 | .border-radius(4px);
148 | }
149 |
--------------------------------------------------------------------------------
/src/test/resources/bootstrap/less/grid.less:
--------------------------------------------------------------------------------
1 | // Fixed (940px)
2 | #grid > .core(@gridColumnWidth, @gridGutterWidth);
3 |
4 | // Fluid (940px)
5 | #grid > .fluid(@fluidGridColumnWidth, @fluidGridGutterWidth);
--------------------------------------------------------------------------------
/src/test/resources/bootstrap/less/hero-unit.less:
--------------------------------------------------------------------------------
1 | // HERO UNIT
2 | // ---------
3 |
4 | .hero-unit {
5 | padding: 60px;
6 | margin-bottom: 30px;
7 | background-color: @heroUnitBackground;
8 | .border-radius(6px);
9 | h1 {
10 | margin-bottom: 0;
11 | font-size: 60px;
12 | line-height: 1;
13 | color: @heroUnitHeadingColor;
14 | letter-spacing: -1px;
15 | }
16 | p {
17 | font-size: 18px;
18 | font-weight: 200;
19 | line-height: @baseLineHeight * 1.5;
20 | color: @heroUnitLeadColor;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/test/resources/bootstrap/less/labels.less:
--------------------------------------------------------------------------------
1 | // LABELS
2 | // ------
3 |
4 | // Base
5 | .label {
6 | padding: 1px 4px 2px;
7 | font-size: @baseFontSize * .846;
8 | font-weight: bold;
9 | line-height: 13px; // ensure proper line-height if floated
10 | color: @white;
11 | vertical-align: middle;
12 | white-space: nowrap;
13 | text-shadow: 0 -1px 0 rgba(0,0,0,.25);
14 | background-color: @grayLight;
15 | .border-radius(3px);
16 | }
17 |
18 | // Hover state
19 | .label:hover {
20 | color: @white;
21 | text-decoration: none;
22 | }
23 |
24 | // Colors
25 | .label-important { background-color: @errorText; }
26 | .label-important:hover { background-color: darken(@errorText, 10%); }
27 |
28 | .label-warning { background-color: @orange; }
29 | .label-warning:hover { background-color: darken(@orange, 10%); }
30 |
31 | .label-success { background-color: @successText; }
32 | .label-success:hover { background-color: darken(@successText, 10%); }
33 |
34 | .label-info { background-color: @infoText; }
35 | .label-info:hover { background-color: darken(@infoText, 10%); }
36 |
37 | .label-inverse { background-color: @grayDark; }
38 | .label-inverse:hover { background-color: darken(@grayDark, 10%); }
--------------------------------------------------------------------------------
/src/test/resources/bootstrap/less/layouts.less:
--------------------------------------------------------------------------------
1 | //
2 | // Layouts
3 | // Fixed-width and fluid (with sidebar) layouts
4 | // --------------------------------------------
5 |
6 |
7 | // Container (centered, fixed-width layouts)
8 | .container {
9 | .container-fixed();
10 | }
11 |
12 | // Fluid layouts (left aligned, with sidebar, min- & max-width content)
13 | .container-fluid {
14 | padding-left: @gridGutterWidth;
15 | padding-right: @gridGutterWidth;
16 | .clearfix();
17 | }
--------------------------------------------------------------------------------
/src/test/resources/bootstrap/less/modals.less:
--------------------------------------------------------------------------------
1 | // MODALS
2 | // ------
3 |
4 | // Recalculate z-index where appropriate
5 | .modal-open {
6 | .dropdown-menu { z-index: @zindexDropdown + @zindexModal; }
7 | .dropdown.open { *z-index: @zindexDropdown + @zindexModal; }
8 | .popover { z-index: @zindexPopover + @zindexModal; }
9 | .tooltip { z-index: @zindexTooltip + @zindexModal; }
10 | }
11 |
12 | // Background
13 | .modal-backdrop {
14 | position: fixed;
15 | top: 0;
16 | right: 0;
17 | bottom: 0;
18 | left: 0;
19 | z-index: @zindexModalBackdrop;
20 | background-color: @black;
21 | // Fade for backdrop
22 | &.fade { opacity: 0; }
23 | }
24 |
25 | .modal-backdrop,
26 | .modal-backdrop.fade.in {
27 | .opacity(80);
28 | }
29 |
30 | // Base modal
31 | .modal {
32 | position: fixed;
33 | top: 50%;
34 | left: 50%;
35 | z-index: @zindexModal;
36 | overflow: auto;
37 | width: 560px;
38 | margin: -250px 0 0 -280px;
39 | background-color: @white;
40 | border: 1px solid #999;
41 | border: 1px solid rgba(0,0,0,.3);
42 | *border: 1px solid #999; /* IE6-7 */
43 | .border-radius(6px);
44 | .box-shadow(0 3px 7px rgba(0,0,0,0.3));
45 | .background-clip(padding-box);
46 | &.fade {
47 | .transition(e('opacity .3s linear, top .3s ease-out'));
48 | top: -25%;
49 | }
50 | &.fade.in { top: 50%; }
51 | }
52 | .modal-header {
53 | padding: 9px 15px;
54 | border-bottom: 1px solid #eee;
55 | // Close icon
56 | .close { margin-top: 2px; }
57 | }
58 |
59 | // Body (where all modal content resises)
60 | .modal-body {
61 | overflow-y: auto;
62 | max-height: 400px;
63 | padding: 15px;
64 | }
65 | // Remove bottom margin if need be
66 | .modal-form {
67 | margin-bottom: 0;
68 | }
69 |
70 | // Footer (for actions)
71 | .modal-footer {
72 | padding: 14px 15px 15px;
73 | margin-bottom: 0;
74 | text-align: right; // right align buttons
75 | background-color: #f5f5f5;
76 | border-top: 1px solid #ddd;
77 | .border-radius(0 0 6px 6px);
78 | .box-shadow(inset 0 1px 0 @white);
79 | .clearfix(); // clear it in case folks use .pull-* classes on buttons
80 |
81 | // Properly space out buttons
82 | .btn + .btn {
83 | margin-left: 5px;
84 | margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
85 | }
86 | // but override that for button groups
87 | .btn-group .btn + .btn {
88 | margin-left: -1px;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/test/resources/bootstrap/less/pager.less:
--------------------------------------------------------------------------------
1 | // PAGER
2 | // -----
3 |
4 | .pager {
5 | margin-left: 0;
6 | margin-bottom: @baseLineHeight;
7 | list-style: none;
8 | text-align: center;
9 | .clearfix();
10 | }
11 | .pager li {
12 | display: inline;
13 | }
14 | .pager a {
15 | display: inline-block;
16 | padding: 5px 14px;
17 | background-color: #fff;
18 | border: 1px solid #ddd;
19 | .border-radius(15px);
20 | }
21 | .pager a:hover {
22 | text-decoration: none;
23 | background-color: #f5f5f5;
24 | }
25 | .pager .next a {
26 | float: right;
27 | }
28 | .pager .previous a {
29 | float: left;
30 | }
31 | .pager .disabled a,
32 | .pager .disabled a:hover {
33 | color: @grayLight;
34 | background-color: #fff;
35 | cursor: default;
36 | }
--------------------------------------------------------------------------------
/src/test/resources/bootstrap/less/pagination.less:
--------------------------------------------------------------------------------
1 | // PAGINATION
2 | // ----------
3 |
4 | .pagination {
5 | height: @baseLineHeight * 2;
6 | margin: @baseLineHeight 0;
7 | }
8 | .pagination ul {
9 | display: inline-block;
10 | .ie7-inline-block();
11 | margin-left: 0;
12 | margin-bottom: 0;
13 | .border-radius(3px);
14 | .box-shadow(0 1px 2px rgba(0,0,0,.05));
15 | }
16 | .pagination li {
17 | display: inline;
18 | }
19 | .pagination a {
20 | float: left;
21 | padding: 0 14px;
22 | line-height: (@baseLineHeight * 2) - 2;
23 | text-decoration: none;
24 | border: 1px solid #ddd;
25 | border-left-width: 0;
26 | }
27 | .pagination a:hover,
28 | .pagination .active a {
29 | background-color: #f5f5f5;
30 | }
31 | .pagination .active a {
32 | color: @grayLight;
33 | cursor: default;
34 | }
35 | .pagination .disabled span,
36 | .pagination .disabled a,
37 | .pagination .disabled a:hover {
38 | color: @grayLight;
39 | background-color: transparent;
40 | cursor: default;
41 | }
42 | .pagination li:first-child a {
43 | border-left-width: 1px;
44 | .border-radius(3px 0 0 3px);
45 | }
46 | .pagination li:last-child a {
47 | .border-radius(0 3px 3px 0);
48 | }
49 |
50 | // Centered
51 | .pagination-centered {
52 | text-align: center;
53 | }
54 | .pagination-right {
55 | text-align: right;
56 | }
57 |
--------------------------------------------------------------------------------
/src/test/resources/bootstrap/less/popovers.less:
--------------------------------------------------------------------------------
1 | // POPOVERS
2 | // --------
3 |
4 | .popover {
5 | position: absolute;
6 | top: 0;
7 | left: 0;
8 | z-index: @zindexPopover;
9 | display: none;
10 | padding: 5px;
11 | &.top { margin-top: -5px; }
12 | &.right { margin-left: 5px; }
13 | &.bottom { margin-top: 5px; }
14 | &.left { margin-left: -5px; }
15 | &.top .arrow { #popoverArrow > .top(); }
16 | &.right .arrow { #popoverArrow > .right(); }
17 | &.bottom .arrow { #popoverArrow > .bottom(); }
18 | &.left .arrow { #popoverArrow > .left(); }
19 | .arrow {
20 | position: absolute;
21 | width: 0;
22 | height: 0;
23 | }
24 | }
25 | .popover-inner {
26 | padding: 3px;
27 | width: 280px;
28 | overflow: hidden;
29 | background: @black; // has to be full background declaration for IE fallback
30 | background: rgba(0,0,0,.8);
31 | .border-radius(6px);
32 | .box-shadow(0 3px 7px rgba(0,0,0,0.3));
33 | }
34 | .popover-title {
35 | padding: 9px 15px;
36 | line-height: 1;
37 | background-color: #f5f5f5;
38 | border-bottom:1px solid #eee;
39 | .border-radius(3px 3px 0 0);
40 | }
41 | .popover-content {
42 | padding: 14px;
43 | background-color: @white;
44 | .border-radius(0 0 3px 3px);
45 | .background-clip(padding-box);
46 | p, ul, ol {
47 | margin-bottom: 0;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/test/resources/bootstrap/less/progress-bars.less:
--------------------------------------------------------------------------------
1 | // PROGRESS BARS
2 | // -------------
3 |
4 |
5 | // ANIMATIONS
6 | // ----------
7 |
8 | // Webkit
9 | @-webkit-keyframes progress-bar-stripes {
10 | from { background-position: 0 0; }
11 | to { background-position: 40px 0; }
12 | }
13 |
14 | // Firefox
15 | @-moz-keyframes progress-bar-stripes {
16 | from { background-position: 0 0; }
17 | to { background-position: 40px 0; }
18 | }
19 |
20 | // IE9
21 | @-ms-keyframes progress-bar-stripes {
22 | from { background-position: 0 0; }
23 | to { background-position: 40px 0; }
24 | }
25 |
26 | // Spec
27 | @keyframes progress-bar-stripes {
28 | from { background-position: 0 0; }
29 | to { background-position: 40px 0; }
30 | }
31 |
32 |
33 |
34 | // THE BARS
35 | // --------
36 |
37 | // Outer container
38 | .progress {
39 | overflow: hidden;
40 | height: 18px;
41 | margin-bottom: 18px;
42 | #gradient > .vertical(#f5f5f5, #f9f9f9);
43 | .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
44 | .border-radius(4px);
45 | }
46 |
47 | // Bar of progress
48 | .progress .bar {
49 | width: 0%;
50 | height: 18px;
51 | color: @white;
52 | font-size: 12px;
53 | text-align: center;
54 | text-shadow: 0 -1px 0 rgba(0,0,0,.25);
55 | #gradient > .vertical(#149bdf, #0480be);
56 | .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));
57 | .box-sizing(border-box);
58 | .transition(width .6s ease);
59 | }
60 |
61 | // Striped bars
62 | .progress-striped .bar {
63 | #gradient > .striped(#149bdf);
64 | .background-size(40px 40px);
65 | }
66 |
67 | // Call animation for the active one
68 | .progress.active .bar {
69 | -webkit-animation: progress-bar-stripes 2s linear infinite;
70 | -moz-animation: progress-bar-stripes 2s linear infinite;
71 | animation: progress-bar-stripes 2s linear infinite;
72 | }
73 |
74 |
75 |
76 | // COLORS
77 | // ------
78 |
79 | // Danger (red)
80 | .progress-danger .bar {
81 | #gradient > .vertical(#ee5f5b, #c43c35);
82 | }
83 | .progress-danger.progress-striped .bar {
84 | #gradient > .striped(#ee5f5b);
85 | }
86 |
87 | // Success (green)
88 | .progress-success .bar {
89 | #gradient > .vertical(#62c462, #57a957);
90 | }
91 | .progress-success.progress-striped .bar {
92 | #gradient > .striped(#62c462);
93 | }
94 |
95 | // Info (teal)
96 | .progress-info .bar {
97 | #gradient > .vertical(#5bc0de, #339bb9);
98 | }
99 | .progress-info.progress-striped .bar {
100 | #gradient > .striped(#5bc0de);
101 | }
102 |
103 | // Warning (orange)
104 | .progress-warning .bar {
105 | #gradient > .vertical(lighten(@orange, 15%), @orange);
106 | }
107 | .progress-warning.progress-striped .bar {
108 | #gradient > .striped(lighten(@orange, 15%));
109 | }
110 |
--------------------------------------------------------------------------------
/src/test/resources/bootstrap/less/reset.less:
--------------------------------------------------------------------------------
1 | // Reset.less
2 | // Adapted from Normalize.css http://github.com/necolas/normalize.css
3 | // ------------------------------------------------------------------------
4 |
5 | // Display in IE6-9 and FF3
6 | // -------------------------
7 |
8 | article,
9 | aside,
10 | details,
11 | figcaption,
12 | figure,
13 | footer,
14 | header,
15 | hgroup,
16 | nav,
17 | section {
18 | display: block;
19 | }
20 |
21 | // Display block in IE6-9 and FF3
22 | // -------------------------
23 |
24 | audio,
25 | canvas,
26 | video {
27 | display: inline-block;
28 | *display: inline;
29 | *zoom: 1;
30 | }
31 |
32 | // Prevents modern browsers from displaying 'audio' without controls
33 | // -------------------------
34 |
35 | audio:not([controls]) {
36 | display: none;
37 | }
38 |
39 | // Base settings
40 | // -------------------------
41 |
42 | html {
43 | font-size: 100%;
44 | -webkit-text-size-adjust: 100%;
45 | -ms-text-size-adjust: 100%;
46 | }
47 | // Focus states
48 | a:focus {
49 | .tab-focus();
50 | }
51 | // Hover & Active
52 | a:hover,
53 | a:active {
54 | outline: 0;
55 | }
56 |
57 | // Prevents sub and sup affecting line-height in all browsers
58 | // -------------------------
59 |
60 | sub,
61 | sup {
62 | position: relative;
63 | font-size: 75%;
64 | line-height: 0;
65 | vertical-align: baseline;
66 | }
67 | sup {
68 | top: -0.5em;
69 | }
70 | sub {
71 | bottom: -0.25em;
72 | }
73 |
74 | // Img border in a's and image quality
75 | // -------------------------
76 |
77 | img {
78 | height: auto;
79 | border: 0;
80 | -ms-interpolation-mode: bicubic;
81 | vertical-align: middle;
82 | }
83 |
84 | // Forms
85 | // -------------------------
86 |
87 | // Font size in all browsers, margin changes, misc consistency
88 | button,
89 | input,
90 | select,
91 | textarea {
92 | margin: 0;
93 | font-size: 100%;
94 | vertical-align: middle;
95 | }
96 | button,
97 | input {
98 | *overflow: visible; // Inner spacing ie IE6/7
99 | line-height: normal; // FF3/4 have !important on line-height in UA stylesheet
100 | }
101 | button::-moz-focus-inner,
102 | input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
103 | padding: 0;
104 | border: 0;
105 | }
106 | button,
107 | input[type="button"],
108 | input[type="reset"],
109 | input[type="submit"] {
110 | cursor: pointer; // Cursors on all buttons applied consistently
111 | -webkit-appearance: button; // Style clickable inputs in iOS
112 | }
113 | input[type="search"] { // Appearance in Safari/Chrome
114 | -webkit-appearance: textfield;
115 | -webkit-box-sizing: content-box;
116 | -moz-box-sizing: content-box;
117 | box-sizing: content-box;
118 | }
119 | input[type="search"]::-webkit-search-decoration,
120 | input[type="search"]::-webkit-search-cancel-button {
121 | -webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5
122 | }
123 | textarea {
124 | overflow: auto; // Remove vertical scrollbar in IE6-9
125 | vertical-align: top; // Readability and alignment cross-browser
126 | }
127 |
--------------------------------------------------------------------------------
/src/test/resources/bootstrap/less/scaffolding.less:
--------------------------------------------------------------------------------
1 | // Scaffolding
2 | // Basic and global styles for generating a grid system, structural layout, and page templates
3 | // -------------------------------------------------------------------------------------------
4 |
5 |
6 | // Body reset
7 | // ----------
8 |
9 | body {
10 | margin: 0;
11 | font-family: @baseFontFamily;
12 | font-size: @baseFontSize;
13 | line-height: @baseLineHeight;
14 | color: @textColor;
15 | background-color: @bodyBackground;
16 | }
17 |
18 |
19 | // Links
20 | // -----
21 |
22 | a {
23 | color: @linkColor;
24 | text-decoration: none;
25 | }
26 | a:hover {
27 | color: @linkColorHover;
28 | text-decoration: underline;
29 | }
30 |
--------------------------------------------------------------------------------
/src/test/resources/bootstrap/less/tables.less:
--------------------------------------------------------------------------------
1 | //
2 | // Tables.less
3 | // Tables for, you guessed it, tabular data
4 | // ----------------------------------------
5 |
6 |
7 | // BASE TABLES
8 | // -----------------
9 |
10 | table {
11 | max-width: 100%;
12 | border-collapse: collapse;
13 | border-spacing: 0;
14 | background-color: @tableBackground;
15 | }
16 |
17 | // BASELINE STYLES
18 | // ---------------
19 |
20 | .table {
21 | width: 100%;
22 | margin-bottom: @baseLineHeight;
23 | // Cells
24 | th,
25 | td {
26 | padding: 8px;
27 | line-height: @baseLineHeight;
28 | text-align: left;
29 | vertical-align: top;
30 | border-top: 1px solid @tableBorder;
31 | }
32 | th {
33 | font-weight: bold;
34 | }
35 | // Bottom align for column headings
36 | thead th {
37 | vertical-align: bottom;
38 | }
39 | // Remove top border from thead by default
40 | colgroup + thead tr:first-child th,
41 | colgroup + thead tr:first-child td,
42 | thead:first-child tr:first-child th,
43 | thead:first-child tr:first-child td {
44 | border-top: 0;
45 | }
46 | // Account for multiple tbody instances
47 | tbody + tbody {
48 | border-top: 2px solid @tableBorder;
49 | }
50 | }
51 |
52 |
53 |
54 | // CONDENSED TABLE W/ HALF PADDING
55 | // -------------------------------
56 |
57 | .table-condensed {
58 | th,
59 | td {
60 | padding: 4px 5px;
61 | }
62 | }
63 |
64 |
65 | // BORDERED VERSION
66 | // ----------------
67 |
68 | .table-bordered {
69 | border: 1px solid @tableBorder;
70 | border-left: 0;
71 | border-collapse: separate; // Done so we can round those corners!
72 | *border-collapse: collapsed; // IE7 can't round corners anyway
73 | .border-radius(4px);
74 | th,
75 | td {
76 | border-left: 1px solid @tableBorder;
77 | }
78 | // Prevent a double border
79 | thead:first-child tr:first-child th,
80 | tbody:first-child tr:first-child th,
81 | tbody:first-child tr:first-child td {
82 | border-top: 0;
83 | }
84 | // For first th or td in the first row in the first thead or tbody
85 | thead:first-child tr:first-child th:first-child,
86 | tbody:first-child tr:first-child td:first-child {
87 | .border-radius(4px 0 0 0);
88 | }
89 | thead:first-child tr:first-child th:last-child,
90 | tbody:first-child tr:first-child td:last-child {
91 | .border-radius(0 4px 0 0);
92 | }
93 | // For first th or td in the first row in the first thead or tbody
94 | thead:last-child tr:last-child th:first-child,
95 | tbody:last-child tr:last-child td:first-child {
96 | .border-radius(0 0 0 4px);
97 | }
98 | thead:last-child tr:last-child th:last-child,
99 | tbody:last-child tr:last-child td:last-child {
100 | .border-radius(0 0 4px 0);
101 | }
102 | }
103 |
104 |
105 | // ZEBRA-STRIPING
106 | // --------------
107 |
108 | // Default zebra-stripe styles (alternating gray and transparent backgrounds)
109 | .table-striped {
110 | tbody {
111 | tr:nth-child(odd) td,
112 | tr:nth-child(odd) th {
113 | background-color: @tableBackgroundAccent;
114 | }
115 | }
116 | }
117 |
118 |
119 | // HOVER EFFECT
120 | // ------------
121 | // Placed here since it has to come after the potential zebra striping
122 | .table {
123 | tbody tr:hover td,
124 | tbody tr:hover th {
125 | background-color: @tableBackgroundHover;
126 | }
127 | }
128 |
129 |
130 | // TABLE CELL SIZING
131 | // -----------------
132 |
133 | // Change the columns
134 | table {
135 | .span1 { .tableColumns(1); }
136 | .span2 { .tableColumns(2); }
137 | .span3 { .tableColumns(3); }
138 | .span4 { .tableColumns(4); }
139 | .span5 { .tableColumns(5); }
140 | .span6 { .tableColumns(6); }
141 | .span7 { .tableColumns(7); }
142 | .span8 { .tableColumns(8); }
143 | .span9 { .tableColumns(9); }
144 | .span10 { .tableColumns(10); }
145 | .span11 { .tableColumns(11); }
146 | .span12 { .tableColumns(12); }
147 | .span13 { .tableColumns(13); }
148 | .span14 { .tableColumns(14); }
149 | .span15 { .tableColumns(15); }
150 | .span16 { .tableColumns(16); }
151 | .span17 { .tableColumns(17); }
152 | .span18 { .tableColumns(18); }
153 | .span19 { .tableColumns(19); }
154 | .span20 { .tableColumns(20); }
155 | .span21 { .tableColumns(21); }
156 | .span22 { .tableColumns(22); }
157 | .span23 { .tableColumns(23); }
158 | .span24 { .tableColumns(24); }
159 | }
160 |
--------------------------------------------------------------------------------
/src/test/resources/bootstrap/less/thumbnails.less:
--------------------------------------------------------------------------------
1 | // THUMBNAILS
2 | // ----------
3 |
4 | .thumbnails {
5 | margin-left: -@gridGutterWidth;
6 | list-style: none;
7 | .clearfix();
8 | }
9 | .thumbnails > li {
10 | float: left;
11 | margin: 0 0 @baseLineHeight @gridGutterWidth;
12 | }
13 | .thumbnail {
14 | display: block;
15 | padding: 4px;
16 | line-height: 1;
17 | border: 1px solid #ddd;
18 | .border-radius(4px);
19 | .box-shadow(0 1px 1px rgba(0,0,0,.075));
20 | }
21 | // Add a hover state for linked versions only
22 | a.thumbnail:hover {
23 | border-color: @linkColor;
24 | .box-shadow(0 1px 4px rgba(0,105,214,.25));
25 | }
26 | // Images and captions
27 | .thumbnail > img {
28 | display: block;
29 | max-width: 100%;
30 | margin-left: auto;
31 | margin-right: auto;
32 | }
33 | .thumbnail .caption {
34 | padding: 9px;
35 | }
36 |
--------------------------------------------------------------------------------
/src/test/resources/bootstrap/less/tooltip.less:
--------------------------------------------------------------------------------
1 | // TOOLTIP
2 | // ------=
3 |
4 | .tooltip {
5 | position: absolute;
6 | z-index: @zindexTooltip;
7 | display: block;
8 | visibility: visible;
9 | padding: 5px;
10 | font-size: 11px;
11 | .opacity(0);
12 | &.in { .opacity(80); }
13 | &.top { margin-top: -2px; }
14 | &.right { margin-left: 2px; }
15 | &.bottom { margin-top: 2px; }
16 | &.left { margin-left: -2px; }
17 | &.top .tooltip-arrow { #popoverArrow > .top(); }
18 | &.left .tooltip-arrow { #popoverArrow > .left(); }
19 | &.bottom .tooltip-arrow { #popoverArrow > .bottom(); }
20 | &.right .tooltip-arrow { #popoverArrow > .right(); }
21 | }
22 | .tooltip-inner {
23 | max-width: 200px;
24 | padding: 3px 8px;
25 | color: @white;
26 | text-align: center;
27 | text-decoration: none;
28 | background-color: @black;
29 | .border-radius(4px);
30 | }
31 | .tooltip-arrow {
32 | position: absolute;
33 | width: 0;
34 | height: 0;
35 | }
36 |
--------------------------------------------------------------------------------
/src/test/resources/bootstrap/less/type.less:
--------------------------------------------------------------------------------
1 | // Typography.less
2 | // Headings, body text, lists, code, and more for a versatile and durable typography system
3 | // ----------------------------------------------------------------------------------------
4 |
5 |
6 | // BODY TEXT
7 | // ---------
8 |
9 | p {
10 | margin: 0 0 @baseLineHeight / 2;
11 | font-family: @baseFontFamily;
12 | font-size: @baseFontSize;
13 | line-height: @baseLineHeight;
14 | small {
15 | font-size: @baseFontSize - 2;
16 | color: @grayLight;
17 | }
18 | }
19 | .lead {
20 | margin-bottom: @baseLineHeight;
21 | font-size: 20px;
22 | font-weight: 200;
23 | line-height: @baseLineHeight * 1.5;
24 | }
25 |
26 | // HEADINGS
27 | // --------
28 |
29 | h1, h2, h3, h4, h5, h6 {
30 | margin: 0;
31 | font-family: @headingsFontFamily;
32 | font-weight: @headingsFontWeight;
33 | color: @headingsColor;
34 | text-rendering: optimizelegibility; // Fix the character spacing for headings
35 | small {
36 | font-weight: normal;
37 | color: @grayLight;
38 | }
39 | }
40 | h1 {
41 | font-size: 30px;
42 | line-height: @baseLineHeight * 2;
43 | small {
44 | font-size: 18px;
45 | }
46 | }
47 | h2 {
48 | font-size: 24px;
49 | line-height: @baseLineHeight * 2;
50 | small {
51 | font-size: 18px;
52 | }
53 | }
54 | h3 {
55 | line-height: @baseLineHeight * 1.5;
56 | font-size: 18px;
57 | small {
58 | font-size: 14px;
59 | }
60 | }
61 | h4, h5, h6 {
62 | line-height: @baseLineHeight;
63 | }
64 | h4 {
65 | font-size: 14px;
66 | small {
67 | font-size: 12px;
68 | }
69 | }
70 | h5 {
71 | font-size: 12px;
72 | }
73 | h6 {
74 | font-size: 11px;
75 | color: @grayLight;
76 | text-transform: uppercase;
77 | }
78 |
79 | // Page header
80 | .page-header {
81 | padding-bottom: @baseLineHeight - 1;
82 | margin: @baseLineHeight 0;
83 | border-bottom: 1px solid @grayLighter;
84 | }
85 | .page-header h1 {
86 | line-height: 1;
87 | }
88 |
89 |
90 |
91 | // LISTS
92 | // -----
93 |
94 | // Unordered and Ordered lists
95 | ul, ol {
96 | padding: 0;
97 | margin: 0 0 @baseLineHeight / 2 25px;
98 | }
99 | ul ul,
100 | ul ol,
101 | ol ol,
102 | ol ul {
103 | margin-bottom: 0;
104 | }
105 | ul {
106 | list-style: disc;
107 | }
108 | ol {
109 | list-style: decimal;
110 | }
111 | li {
112 | line-height: @baseLineHeight;
113 | }
114 | ul.unstyled,
115 | ol.unstyled {
116 | margin-left: 0;
117 | list-style: none;
118 | }
119 |
120 | // Description Lists
121 | dl {
122 | margin-bottom: @baseLineHeight;
123 | }
124 | dt,
125 | dd {
126 | line-height: @baseLineHeight;
127 | }
128 | dt {
129 | font-weight: bold;
130 | line-height: @baseLineHeight - 1; // fix jank Helvetica Neue font bug
131 | }
132 | dd {
133 | margin-left: @baseLineHeight / 2;
134 | }
135 | // Horizontal layout (like forms)
136 | .dl-horizontal {
137 | dt {
138 | float: left;
139 | clear: left;
140 | width: 120px;
141 | text-align: right;
142 | }
143 | dd {
144 | margin-left: 130px;
145 | }
146 | }
147 |
148 | // MISC
149 | // ----
150 |
151 | // Horizontal rules
152 | hr {
153 | margin: @baseLineHeight 0;
154 | border: 0;
155 | border-top: 1px solid @hrBorder;
156 | border-bottom: 1px solid @white;
157 | }
158 |
159 | // Emphasis
160 | strong {
161 | font-weight: bold;
162 | }
163 | em {
164 | font-style: italic;
165 | }
166 | .muted {
167 | color: @grayLight;
168 | }
169 |
170 | // Abbreviations and acronyms
171 | abbr[title] {
172 | border-bottom: 1px dotted #ddd;
173 | cursor: help;
174 | }
175 | abbr.initialism {
176 | font-size: 90%;
177 | text-transform: uppercase;
178 | }
179 |
180 | // Blockquotes
181 | blockquote {
182 | padding: 0 0 0 15px;
183 | margin: 0 0 @baseLineHeight;
184 | border-left: 5px solid @grayLighter;
185 | p {
186 | margin-bottom: 0;
187 | #font > .shorthand(16px,300,@baseLineHeight * 1.25);
188 | }
189 | small {
190 | display: block;
191 | line-height: @baseLineHeight;
192 | color: @grayLight;
193 | &:before {
194 | content: '\2014 \00A0';
195 | }
196 | }
197 |
198 | // Float right with text-align: right
199 | &.pull-right {
200 | float: right;
201 | padding-left: 0;
202 | padding-right: 15px;
203 | border-left: 0;
204 | border-right: 5px solid @grayLighter;
205 | p,
206 | small {
207 | text-align: right;
208 | }
209 | }
210 | }
211 |
212 | // Quotes
213 | q:before,
214 | q:after,
215 | blockquote:before,
216 | blockquote:after {
217 | content: "";
218 | }
219 |
220 | // Addresses
221 | address {
222 | display: block;
223 | margin-bottom: @baseLineHeight;
224 | line-height: @baseLineHeight;
225 | font-style: normal;
226 | }
227 |
228 | // Misc
229 | small {
230 | font-size: 100%;
231 | }
232 | cite {
233 | font-style: normal;
234 | }
235 |
--------------------------------------------------------------------------------
/src/test/resources/bootstrap/less/utilities.less:
--------------------------------------------------------------------------------
1 | // UTILITY CLASSES
2 | // ---------------
3 |
4 | // Quick floats
5 | .pull-right {
6 | float: right;
7 | }
8 | .pull-left {
9 | float: left;
10 | }
11 |
12 | // Toggling content
13 | .hide {
14 | display: none;
15 | }
16 | .show {
17 | display: block;
18 | }
19 |
20 | // Visibility
21 | .invisible {
22 | visibility: hidden;
23 | }
24 |
--------------------------------------------------------------------------------
/src/test/resources/bootstrap/less/wells.less:
--------------------------------------------------------------------------------
1 | // WELLS
2 | // -----
3 |
4 | .well {
5 | min-height: 20px;
6 | padding: 19px;
7 | margin-bottom: 20px;
8 | background-color: #f5f5f5;
9 | border: 1px solid #eee;
10 | border: 1px solid rgba(0,0,0,.05);
11 | .border-radius(4px);
12 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05));
13 | blockquote {
14 | border-color: #ddd;
15 | border-color: rgba(0,0,0,.15);
16 | }
17 | }
18 |
19 | // Sizes
20 | .well-large {
21 | padding: 24px;
22 | .border-radius(6px);
23 | }
24 | .well-small {
25 | padding: 9px;
26 | .border-radius(3px);
27 | }
28 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/a_source.less:
--------------------------------------------------------------------------------
1 | content
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/colors.css:
--------------------------------------------------------------------------------
1 | #yelow #short {
2 | color: #fea;
3 | }
4 | #yelow #long {
5 | color: #ffeeaa;
6 | }
7 | #yelow #rgba {
8 | color: rgba(255, 238, 170, 0.1);
9 | }
10 | #yelow #argb {
11 | color: #1affeeaa;
12 | }
13 | #blue #short {
14 | color: #00f;
15 | }
16 | #blue #long {
17 | color: #0000ff;
18 | }
19 | #blue #rgba {
20 | color: rgba(0, 0, 255, 0.1);
21 | }
22 | #blue #argb {
23 | color: #1a0000ff;
24 | }
25 | #alpha #hsla {
26 | color: rgba(61, 45, 41, 0.6);
27 | }
28 | #overflow .a {
29 | color: #000000;
30 | }
31 | #overflow .b {
32 | color: #ffffff;
33 | }
34 | #overflow .c {
35 | color: #ffffff;
36 | }
37 | #overflow .d {
38 | color: #00ff00;
39 | }
40 | #grey {
41 | color: #c8c8c8;
42 | }
43 | #808080 {
44 | color: #808080;
45 | }
46 | #00ff00 {
47 | color: #00ff00;
48 | }
49 | .lightenblue {
50 | color: #3333ff;
51 | }
52 | .darkenblue {
53 | color: #0000cc;
54 | }
55 | .unknowncolors {
56 | color: blue2;
57 | border: 2px solid superred;
58 | }
59 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/comments.css:
--------------------------------------------------------------------------------
1 | /******************\
2 | * *
3 | * Comment Header *
4 | * *
5 | \******************/
6 | /*
7 |
8 | Comment
9 |
10 | */
11 | /*
12 | * Comment Test
13 | *
14 | * - cloudhead (http://cloudhead.net)
15 | *
16 | */
17 | /* Colors
18 | * ------
19 | * #EDF8FC (background blue)
20 | * #166C89 (darkest blue)
21 | *
22 | * Text:
23 | * #333 (standard text) // A comment within a comment!
24 | * #1F9EC9 (standard link)
25 | *
26 | */
27 | /* @group Variables
28 | ------------------- */
29 | #comments {
30 | /**/
31 | color: red;
32 | /* A C-style comment */
33 | background-color: orange;
34 | font-size: 12px;
35 | /* lost comment */
36 | content: "content";
37 | border: 1px solid black;
38 | padding: 0;
39 | margin: 2em;
40 | }
41 | /* commented out
42 | #more-comments {
43 | color: grey;
44 | }
45 | */
46 | .selector,
47 | .lots,
48 | .comments {
49 | color: #808080, /* blue */ #ffa500;
50 | -webkit-border-radius: 2px /* webkit only */;
51 | -moz-border-radius: 8px /* moz only with operation */;
52 | }
53 | #last {
54 | color: #0000ff;
55 | }
56 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/css-3.css:
--------------------------------------------------------------------------------
1 | .comma-delimited {
2 | background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg);
3 | text-shadow: -1px -1px 1px #ff0000, 6px 5px 5px #ffff00;
4 | -moz-box-shadow: 0pt 0pt 2px rgba(255, 255, 255, 0.4) inset, 0pt 4px 6px rgba(255, 255, 255, 0.4) inset;
5 | }
6 | @font-face {
7 | font-family: Headline;
8 | src: local(Futura-Medium), url(fonts.svg#MyGeometricModern) format("svg");
9 | }
10 | .other {
11 | -moz-transform: translate(0, 11em) rotate(-90deg);
12 | }
13 | p:not([class*="lead"]) {
14 | color: black;
15 | }
16 | input[type="text"].class#id[attr=32]:not(1) {
17 | color: white;
18 | }
19 | div#id.class[a=1][b=2].class:not(1) {
20 | color: white;
21 | }
22 | ul.comma > li:not(:only-child)::after {
23 | color: white;
24 | }
25 | ol.comma > li:nth-last-child(2)::after {
26 | color: white;
27 | }
28 | li:nth-child(4n+1),
29 | li:nth-child(-5n),
30 | li:nth-child(-n+2) {
31 | color: white;
32 | }
33 | a[href^="http://"] {
34 | color: black;
35 | }
36 | a[href$="http://"] {
37 | color: black;
38 | }
39 | form[data-disabled] {
40 | color: black;
41 | }
42 | p::before {
43 | color: black;
44 | }
45 | #issue322 {
46 | -webkit-animation: anim2 7s infinite ease-in-out;
47 | }
48 | @-webkit-keyframes frames {
49 | 0% {
50 | border: 1px;
51 | }
52 | 5.5% {
53 | border: 2px;
54 | }
55 | 100% {
56 | border: 3px;
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/css-escapes.css:
--------------------------------------------------------------------------------
1 | .escape\|random\|char {
2 | color: red;
3 | }
4 | .mixin\!tUp {
5 | font-weight: bold;
6 | }
7 | .\34 04 {
8 | background: red;
9 | }
10 | .\34 04 strong {
11 | color: #ff00ff;
12 | font-weight: bold;
13 | }
14 | .trailingTest\+ {
15 | color: red;
16 | }
17 | /* This hideous test of hideousness checks for the selector "blockquote" with various permutations of hex escapes */
18 | \62\6c\6f \63 \6B \0071 \000075o\74 e {
19 | color: silver;
20 | }
21 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/css.css:
--------------------------------------------------------------------------------
1 | @charset "utf-8";
2 | div {
3 | color: black;
4 | }
5 | div {
6 | width: 99%;
7 | }
8 | * {
9 | min-width: 45em;
10 | }
11 | h1,
12 | h2 > a > p,
13 | h3 {
14 | color: none;
15 | }
16 | div.class {
17 | color: blue;
18 | }
19 | div#id {
20 | color: green;
21 | }
22 | .class#id {
23 | color: purple;
24 | }
25 | .one.two.three {
26 | color: grey;
27 | }
28 | @media print {
29 | font-size: 3em;
30 | }
31 | @media screen {
32 | font-size: 10px;
33 | }
34 | @font-face {
35 | font-family: 'Garamond Pro';
36 | src: url("/fonts/garamond-pro.ttf");
37 | }
38 | a:hover,
39 | a:link {
40 | color: #999;
41 | }
42 | p,
43 | p:first-child {
44 | text-transform: none;
45 | }
46 | q:lang(no) {
47 | quotes: none;
48 | }
49 | p + h1 {
50 | font-size: 2.2em;
51 | }
52 | #shorthands {
53 | border: 1px solid #000;
54 | font: 12px/16px Arial;
55 | font: 100%/16px Arial;
56 | margin: 1px 0;
57 | padding: 0 auto;
58 | background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
59 | }
60 | #more-shorthands {
61 | margin: 0;
62 | padding: 1px 0 2px 0;
63 | font: normal small / 20px 'Trebuchet MS', Verdana, sans-serif;
64 | }
65 | .misc {
66 | -moz-border-radius: 2px;
67 | display: -moz-inline-stack;
68 | width: .1em;
69 | background-color: #009998;
70 | background-image: url(images/image.jpg);
71 | background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), to(#0000ff));
72 | margin: ;
73 | filter: alpha(opacity=100);
74 | }
75 | #important {
76 | color: red !important;
77 | width: 100%!important;
78 | height: 20px ! important;
79 | }
80 | #data-uri {
81 | background: url(data:image/png;charset=utf-8;base64,
82 | kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
83 | k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
84 | kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
85 | background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
86 | }
87 | #svg-data-uri {
88 | background: transparent url('data:image/svg+xml, ');
89 | }
90 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/functions.css:
--------------------------------------------------------------------------------
1 | #functions {
2 | color: #660000;
3 | width: 16;
4 | height: undefined("self");
5 | border-width: 5;
6 | variable: 11;
7 | }
8 | #built-in {
9 | escaped: -Some::weird(#thing, y);
10 | lighten: #ffcccc;
11 | darken: #330000;
12 | saturate: #203c31;
13 | desaturate: #29332f;
14 | greyscale: #2e2e2e;
15 | spin-p: #bf6a40;
16 | spin-n: #bf4055;
17 | format: "rgb(32, 128, 64)";
18 | format-string: "hello world";
19 | format-multiple: "hello earth 2";
20 | format-url-encode: 'red is %23ff0000';
21 | eformat: rgb(32, 128, 64);
22 | hue: 98;
23 | saturation: 12%;
24 | lightness: 95%;
25 | rounded: 11;
26 | roundedpx: 3px;
27 | percentage: 20%;
28 | color: #ff0011;
29 | }
30 | #built-in .is-a {
31 | color: true;
32 | keyword: true;
33 | number: true;
34 | string: true;
35 | pixel: true;
36 | percent: true;
37 | em: true;
38 | }
39 | #alpha {
40 | alpha: rgba(153, 94, 51, 0.6);
41 | }
42 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/ie-filters.css:
--------------------------------------------------------------------------------
1 | .nav {
2 | filter: progid:DXImageTransform.Microsoft.Alpha(opacity=20);
3 | filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
4 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#333333", endColorstr="#000000", GradientType=0);
5 | }
6 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/import.css:
--------------------------------------------------------------------------------
1 | @import "import-test-d.css";
2 | @import url(http://fonts.googleapis.com/css?family=Open+Sans);
3 | @import url(something.css) screen and (color) and (max-width: 600px);
4 | #import {
5 | color: #ff0000;
6 | }
7 | .mixin {
8 | height: 10px;
9 | color: #ff0000;
10 | }
11 | #import-test {
12 | height: 10px;
13 | color: #ff0000;
14 | width: 10px;
15 | height: 30%;
16 | }
17 | @media screen and (max-width: 600px) {
18 | body {
19 | width: 100%;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/import_custom.css:
--------------------------------------------------------------------------------
1 | @import "import-test-d.css";
2 | @import url(http://fonts.googleapis.com/css?family=Open+Sans);
3 | @import url(something.css) screen and (color) and (max-width: 600px);
4 | #import {
5 | color: #ff0000;
6 | }
7 | .mixin {
8 | height: 10px;
9 | color: #ff0000;
10 | }
11 | #import-test {
12 | height: 10px;
13 | color: #ff0000;
14 | width: 10px;
15 | height: 30%;
16 | }
17 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/javascript.css:
--------------------------------------------------------------------------------
1 | .eval {
2 | js: 42;
3 | js: 2;
4 | js: "hello world";
5 | js: 1, 2, 3;
6 | title: "node";
7 | ternary: true;
8 | }
9 | .scope {
10 | var: "42";
11 | escaped: 7px;
12 | }
13 | .vars {
14 | width: 8;
15 | }
16 | .escape-interpol {
17 | width: hello world;
18 | }
19 | .arrays {
20 | ary: "1, 2, 3";
21 | }
22 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/lazy-eval.css:
--------------------------------------------------------------------------------
1 | .lazy-eval {
2 | width: 100%;
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/media.css:
--------------------------------------------------------------------------------
1 | @media print {
2 | .class {
3 | color: blue;
4 | }
5 | .class .sub {
6 | width: 42;
7 | }
8 | .top,
9 | header > h1 {
10 | color: #444444;
11 | }
12 | }
13 | @media screen {
14 | body {
15 | max-width: 480;
16 | }
17 | }
18 | @media all and (orientation: portrait) {
19 | aside {
20 | float: none;
21 | }
22 | }
23 | @media handheld and (min-width: 42), screen and (min-width: 20em) {
24 | body {
25 | max-width: 480px;
26 | }
27 | }
28 | @media print {
29 | body {
30 | padding: 20px;
31 | }
32 | body header {
33 | background-color: red;
34 | }
35 | }
36 | @media print and (orientation: landscape) {
37 | body {
38 | margin-left: 20px;
39 | }
40 | }
41 | @media a, b and c {
42 | body {
43 | width: 95%;
44 | }
45 | }
46 | @media a and x, b and c and x, a and y, b and c and y {
47 | body {
48 | width: 100%;
49 | }
50 | }
51 | .a {
52 | background: black;
53 | }
54 | @media handheld {
55 | .a {
56 | background: white;
57 | }
58 | }
59 | @media handheld and (max-width: 100px) {
60 | .a {
61 | background: red;
62 | }
63 | }
64 | .b {
65 | background: black;
66 | }
67 | @media handheld {
68 | .b {
69 | background: white;
70 | }
71 | }
72 | @media handheld and (max-width: 200px) {
73 | .b {
74 | background: red;
75 | }
76 | }
77 | @media only screen and (max-width: 200px) {
78 | width: 480px;
79 | }
80 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/mixins-args.css:
--------------------------------------------------------------------------------
1 | #hidden {
2 | color: transparent;
3 | }
4 | .two-args {
5 | color: blue;
6 | width: 10px;
7 | height: 99%;
8 | border: 2px dotted #000000;
9 | }
10 | .one-arg {
11 | width: 15px;
12 | height: 49%;
13 | }
14 | .no-parens {
15 | width: 5px;
16 | height: 49%;
17 | }
18 | .no-args {
19 | width: 5px;
20 | height: 49%;
21 | }
22 | .var-args {
23 | width: 45;
24 | height: 17%;
25 | }
26 | .multi-mix {
27 | width: 10px;
28 | height: 29%;
29 | margin: 4;
30 | padding: 5;
31 | }
32 | body {
33 | padding: 30px;
34 | color: #ff0000;
35 | }
36 | .scope-mix {
37 | width: 8;
38 | }
39 | .content {
40 | width: 600px;
41 | }
42 | .content .column {
43 | margin: 600px;
44 | }
45 | #same-var-name {
46 | radius: 5px;
47 | }
48 | #var-inside {
49 | width: 10px;
50 | }
51 | .id-class {
52 | color: red;
53 | }
54 | .arguments {
55 | border: 1px solid #000000;
56 | width: 1px;
57 | }
58 | .arguments2 {
59 | border: 0px;
60 | width: 0px;
61 | }
62 | .arguments3 {
63 | border: 0px;
64 | width: 0px;
65 | }
66 | .arguments4 {
67 | border: 0 1 2 3 4;
68 | rest: 1 2 3 4;
69 | width: 0;
70 | }
71 | .edge-case {
72 | border: "{";
73 | width: "{";
74 | }
75 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/mixins-closure.css:
--------------------------------------------------------------------------------
1 | .class {
2 | width: 99px;
3 | }
4 | .overwrite {
5 | width: 99px;
6 | }
7 | .nested .class {
8 | width: 5px;
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/mixins-guards.css:
--------------------------------------------------------------------------------
1 | .light1 {
2 | color: white;
3 | margin: 1px;
4 | }
5 | .light2 {
6 | color: black;
7 | margin: 1px;
8 | }
9 | .max1 {
10 | width: 6;
11 | }
12 | .max2 {
13 | width: 8;
14 | }
15 | .glob1 {
16 | margin: auto auto;
17 | }
18 | .ops1 {
19 | height: gt-or-eq;
20 | height: lt-or-eq;
21 | }
22 | .ops2 {
23 | height: gt-or-eq;
24 | height: not-eq;
25 | }
26 | .ops3 {
27 | height: lt-or-eq;
28 | height: not-eq;
29 | }
30 | .default1 {
31 | content: default;
32 | }
33 | .test1 {
34 | content: "true.";
35 | }
36 | .test2 {
37 | content: "false.";
38 | }
39 | .test3 {
40 | content: "false.";
41 | }
42 | .test4 {
43 | content: "false.";
44 | }
45 | .test5 {
46 | content: "false.";
47 | }
48 | .bool1 {
49 | content: true and true;
50 | content: true;
51 | content: false, true;
52 | content: false and true and true, true;
53 | content: false, true and true;
54 | content: false, false, true;
55 | content: false, true and true and true, false;
56 | content: not false;
57 | content: not false and false, not false;
58 | }
59 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/mixins-important.css:
--------------------------------------------------------------------------------
1 | .class {
2 | border: 1;
3 | boxer: 1;
4 | border: 2 !important;
5 | boxer: 2 !important;
6 | border: 3;
7 | boxer: 3;
8 | border: 4 !important;
9 | boxer: 4 !important;
10 | border: 5;
11 | boxer: 5;
12 | border: 0 !important;
13 | boxer: 0 !important;
14 | border: 9 !important;
15 | border: 9;
16 | boxer: 9;
17 | }
18 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/mixins-nested.css:
--------------------------------------------------------------------------------
1 | .class .inner {
2 | height: 300;
3 | }
4 | .class .inner .innest {
5 | width: 30;
6 | border-width: 60;
7 | }
8 | .class2 .inner {
9 | height: 600;
10 | }
11 | .class2 .inner .innest {
12 | width: 60;
13 | border-width: 120;
14 | }
15 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/mixins-pattern.css:
--------------------------------------------------------------------------------
1 | .zero {
2 | variadic: true;
3 | zero: 0;
4 | one: 1;
5 | two: 2;
6 | three: 3;
7 | }
8 | .one {
9 | variadic: true;
10 | one: 1;
11 | one-req: 1;
12 | two: 2;
13 | three: 3;
14 | }
15 | .two {
16 | variadic: true;
17 | two: 2;
18 | three: 3;
19 | }
20 | .three {
21 | variadic: true;
22 | three-req: 3;
23 | three: 3;
24 | }
25 | .left {
26 | left: 1;
27 | }
28 | .right {
29 | right: 1;
30 | }
31 | .border-right {
32 | color: black;
33 | border-right: 4px;
34 | }
35 | .border-left {
36 | color: black;
37 | border-left: 4px;
38 | }
39 | .only-right {
40 | right: 33;
41 | }
42 | .only-left {
43 | left: 33;
44 | }
45 | .left-right {
46 | both: 330;
47 | }
48 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/mixins.css:
--------------------------------------------------------------------------------
1 | .mixin {
2 | border: 1px solid black;
3 | }
4 | .mixout {
5 | border-color: orange;
6 | }
7 | .borders {
8 | border-style: dashed;
9 | }
10 | #namespace .borders {
11 | border-style: dotted;
12 | }
13 | #namespace .biohazard {
14 | content: "death";
15 | }
16 | #namespace .biohazard .man {
17 | color: transparent;
18 | }
19 | #theme > .mixin {
20 | background-color: grey;
21 | }
22 | #container {
23 | color: black;
24 | border: 1px solid black;
25 | border-color: orange;
26 | background-color: grey;
27 | }
28 | #header .milk {
29 | color: white;
30 | border: 1px solid black;
31 | background-color: grey;
32 | }
33 | #header #cookie {
34 | border-style: dashed;
35 | }
36 | #header #cookie .chips {
37 | border-style: dotted;
38 | }
39 | #header #cookie .chips .calories {
40 | color: black;
41 | border: 1px solid black;
42 | border-color: orange;
43 | background-color: grey;
44 | }
45 | .secure-zone {
46 | color: transparent;
47 | }
48 | .direct {
49 | border-style: dotted;
50 | }
51 | .bo,
52 | .bar {
53 | width: 100%;
54 | }
55 | .bo {
56 | border: 1px;
57 | }
58 | .ar.bo.ca {
59 | color: black;
60 | }
61 | .jo.ki {
62 | background: none;
63 | }
64 | .extended {
65 | width: 100%;
66 | border: 1px;
67 | background: none;
68 | }
69 | .foo .bar {
70 | width: 100%;
71 | }
72 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/operations.css:
--------------------------------------------------------------------------------
1 | #operations {
2 | color: #111111;
3 | height: 9px;
4 | width: 3em;
5 | substraction: 0;
6 | division: 1;
7 | }
8 | #operations .spacing {
9 | height: 9px;
10 | width: 3em;
11 | }
12 | .with-variables {
13 | height: 16em;
14 | width: 24em;
15 | size: 1cm;
16 | }
17 | .with-functions {
18 | color: #646464;
19 | color: #ff8080;
20 | color: #c94a4a;
21 | }
22 | .negative {
23 | height: 0px;
24 | width: 4px;
25 | }
26 | .shorthands {
27 | padding: -1px 2px 0 -4px;
28 | }
29 | .rem-dimensions {
30 | font-size: 5.5rem;
31 | }
32 | .colors {
33 | color: #123;
34 | border-color: #334455;
35 | background-color: #000000;
36 | }
37 | .colors .other {
38 | color: #222222;
39 | border-color: #222222;
40 | }
41 | .negations {
42 | variable: -4px;
43 | variable1: 0px;
44 | variable2: 0px;
45 | variable3: 8px;
46 | variable4: 0px;
47 | paren: -4px;
48 | paren2: 16px;
49 | }
50 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/parens.css:
--------------------------------------------------------------------------------
1 | .parens {
2 | border: 2px solid #000000;
3 | margin: 1px 3px 16 3;
4 | width: 36;
5 | padding: 2px 36px;
6 | }
7 | .more-parens {
8 | padding: 8 4 4 4px;
9 | width: 96;
10 | height: 113;
11 | margin: 12;
12 | }
13 | .nested-parens {
14 | width: 71;
15 | height: 6;
16 | }
17 | .mixed-units {
18 | margin: 2px 4em 1 5pc;
19 | padding: 6px 1em 2px 2;
20 | }
21 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/rulesets.css:
--------------------------------------------------------------------------------
1 | #first > .one {
2 | font-size: 2em;
3 | }
4 | #first > .one > #second .two > #deux {
5 | width: 50%;
6 | }
7 | #first > .one > #second .two > #deux #third {
8 | height: 100%;
9 | }
10 | #first > .one > #second .two > #deux #third:focus {
11 | color: black;
12 | }
13 | #first > .one > #second .two > #deux #third:focus #fifth > #sixth .seventh #eighth + #ninth {
14 | color: purple;
15 | }
16 | #first > .one > #second .two > #deux #fourth,
17 | #first > .one > #second .two > #deux #five,
18 | #first > .one > #second .two > #deux #six {
19 | color: #110000;
20 | }
21 | #first > .one > #second .two > #deux #fourth .seven,
22 | #first > .one > #second .two > #deux #five .seven,
23 | #first > .one > #second .two > #deux #six .seven,
24 | #first > .one > #second .two > #deux #fourth .eight > #nine,
25 | #first > .one > #second .two > #deux #five .eight > #nine,
26 | #first > .one > #second .two > #deux #six .eight > #nine {
27 | border: 1px solid black;
28 | }
29 | #first > .one > #second .two > #deux #fourth #ten,
30 | #first > .one > #second .two > #deux #five #ten,
31 | #first > .one > #second .two > #deux #six #ten {
32 | color: red;
33 | }
34 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/scope.css:
--------------------------------------------------------------------------------
1 | .tiny-scope {
2 | color: #998899;
3 | }
4 | .scope1 {
5 | color: #0000ff;
6 | border-color: #000000;
7 | }
8 | .scope1 .scope2 {
9 | color: #0000ff;
10 | }
11 | .scope1 .scope2 .scope3 {
12 | color: #ff0000;
13 | border-color: #000000;
14 | background-color: #ffffff;
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/selectors.css:
--------------------------------------------------------------------------------
1 | h1 a:hover,
2 | h2 a:hover,
3 | h3 a:hover,
4 | h1 p:hover,
5 | h2 p:hover,
6 | h3 p:hover {
7 | color: red;
8 | }
9 | #all {
10 | color: blue;
11 | }
12 | #the {
13 | color: blue;
14 | }
15 | #same {
16 | color: blue;
17 | }
18 | ul,
19 | li,
20 | div,
21 | q,
22 | blockquote,
23 | textarea {
24 | margin: 0;
25 | }
26 | td {
27 | margin: 0;
28 | padding: 0;
29 | }
30 | td,
31 | input {
32 | line-height: 1em;
33 | }
34 | a {
35 | color: red;
36 | }
37 | a:hover {
38 | color: blue;
39 | }
40 | div a {
41 | color: green;
42 | }
43 | p a span {
44 | color: yellow;
45 | }
46 | .foo .bar .qux,
47 | .foo .baz .qux {
48 | display: block;
49 | }
50 | .qux .foo .bar,
51 | .qux .foo .baz {
52 | display: inline;
53 | }
54 | .qux .foo .bar .biz,
55 | .qux .foo .baz .biz {
56 | display: none;
57 | }
58 | .other ::fnord {
59 | color: #ff0000;
60 | }
61 | .other::fnord {
62 | color: #ff0000;
63 | }
64 | .other ::bnord {
65 | color: #ff0000;
66 | }
67 | .other::bnord {
68 | color: #ff0000;
69 | }
70 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/strings.css:
--------------------------------------------------------------------------------
1 | #strings {
2 | background-image: url("http://son-of-a-banana.com");
3 | quotes: "~" "~";
4 | content: "#*%:&^,)!.(~*})";
5 | empty: "";
6 | brackets: "{" "}";
7 | escapes: "\"hello\" \\world";
8 | escapes2: "\"llo";
9 | }
10 | #comments {
11 | content: "/* hello */ // not-so-secret";
12 | }
13 | #single-quote {
14 | quotes: "'" "'";
15 | content: '""#!&""';
16 | empty: '';
17 | semi-colon: ';';
18 | }
19 | #escaped {
20 | filter: DX.Transform.MS.BS.filter(opacity=50);
21 | }
22 | #one-line {
23 | image: url(http://tooks.com);
24 | }
25 | #crazy {
26 | image: url(http://), "}", url("http://}");
27 | }
28 | #interpolation {
29 | url: "http://lesscss.org/dev/image.jpg";
30 | url2: "http://lesscss.org/image-256.jpg";
31 | url3: "http://lesscss.org#445566";
32 | url4: "http://lesscss.org/hello";
33 | url5: "http://lesscss.org/54.4px";
34 | }
35 | .mix-mul-class {
36 | color: #ff0000;
37 | color: #0000ff;
38 | color: #ffa500;
39 | }
40 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/variables.css:
--------------------------------------------------------------------------------
1 | .variables {
2 | width: 14cm;
3 | }
4 | .variables {
5 | height: 24px;
6 | color: #888888;
7 | font-family: "Trebuchet MS", Verdana, sans-serif;
8 | quotes: "~" "~";
9 | }
10 | .redefinition {
11 | three: 3;
12 | }
13 | .values {
14 | font-family: 'Trebuchet', 'Trebuchet', 'Trebuchet';
15 | color: #888888 !important;
16 | url: url('Trebuchet');
17 | multi: something 'A', B, C, 'Trebuchet';
18 | }
19 | .variable-names {
20 | name: 'hello';
21 | }
22 | .alpha {
23 | filter: alpha(opacity=42);
24 | }
25 | a:nth-child(2) {
26 | border: 1px;
27 | }
28 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/css/whitespace.css:
--------------------------------------------------------------------------------
1 | .whitespace {
2 | color: white;
3 | }
4 | .whitespace {
5 | color: white;
6 | }
7 | .whitespace {
8 | color: white;
9 | }
10 | .whitespace {
11 | color: white;
12 | }
13 | .whitespace {
14 | color: white ;
15 | }
16 | .white,
17 | .space,
18 | .mania {
19 | color: white;
20 | }
21 | .no-semi-column {
22 | color: #ffffff;
23 | }
24 | .no-semi-column {
25 | color: white;
26 | white-space: pre;
27 | }
28 | .no-semi-column {
29 | border: 2px solid #ffffff;
30 | }
31 | .newlines {
32 | background: the,
33 | great,
34 | wall;
35 | border: 2px
36 | solid
37 | black;
38 | }
39 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/custom.color.js:
--------------------------------------------------------------------------------
1 | less.tree.functions._color = function (str) {
2 | if (str.value === "evil red") { return new(less.tree.Color)("600"); }
3 | };
4 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/custom.math.js:
--------------------------------------------------------------------------------
1 | less.tree.functions.add = function (a, b) {
2 | return new(less.tree.Dimension)(a.value + b.value);
3 | };
4 | less.tree.functions.increment = function (a) {
5 | return new(less.tree.Dimension)(a.value + 1);
6 | };
--------------------------------------------------------------------------------
/src/test/resources/compatibility/custom.process.title.js:
--------------------------------------------------------------------------------
1 | function process() {
2 | this.title = 'node';
3 | }
4 |
5 | var process = new process();
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/colors.less:
--------------------------------------------------------------------------------
1 | #yelow {
2 | #short {
3 | color: #fea;
4 | }
5 | #long {
6 | color: #ffeeaa;
7 | }
8 | #rgba {
9 | color: rgba(255, 238, 170, 0.1);
10 | }
11 | #argb {
12 | color: argb(rgba(255, 238, 170, 0.1));
13 | }
14 | }
15 |
16 | #blue {
17 | #short {
18 | color: #00f;
19 | }
20 | #long {
21 | color: #0000ff;
22 | }
23 | #rgba {
24 | color: rgba(0, 0, 255, 0.1);
25 | }
26 | #argb {
27 | color: argb(rgba(0, 0, 255, 0.1));
28 | }
29 | }
30 |
31 | #alpha #hsla {
32 | color: hsla(11, 20%, 20%, 0.6);
33 | }
34 |
35 | #overflow {
36 | .a { color: #111111 - #444444; } // #000000
37 | .b { color: #eee + #fff; } // #ffffff
38 | .c { color: #aaa * 3; } // #ffffff
39 | .d { color: #00ee00 + #009900; } // #00ff00
40 | }
41 |
42 | #grey {
43 | color: rgb(200, 200, 200);
44 | }
45 |
46 | #808080 {
47 | color: hsl(50, 0%, 50%);
48 | }
49 |
50 | #00ff00 {
51 | color: hsl(120, 100%, 50%);
52 | }
53 |
54 | .lightenblue {
55 | color: lighten(blue, 10%);
56 | }
57 |
58 | .darkenblue {
59 | color: darken(blue, 10%);
60 | }
61 |
62 | .unknowncolors {
63 | color: blue2;
64 | border: 2px solid superred;
65 | }
66 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/comments.less:
--------------------------------------------------------------------------------
1 | /******************\
2 | * *
3 | * Comment Header *
4 | * *
5 | \******************/
6 |
7 | /*
8 |
9 | Comment
10 |
11 | */
12 |
13 | /*
14 | * Comment Test
15 | *
16 | * - cloudhead (http://cloudhead.net)
17 | *
18 | */
19 |
20 | ////////////////
21 | @var: "content";
22 | ////////////////
23 |
24 | /* Colors
25 | * ------
26 | * #EDF8FC (background blue)
27 | * #166C89 (darkest blue)
28 | *
29 | * Text:
30 | * #333 (standard text) // A comment within a comment!
31 | * #1F9EC9 (standard link)
32 | *
33 | */
34 |
35 | /* @group Variables
36 | ------------------- */
37 | #comments /* boo */ {
38 | /**/ // An empty comment
39 | color: red; /* A C-style comment */
40 | background-color: orange; // A little comment
41 | font-size: 12px;
42 |
43 | /* lost comment */ content: @var;
44 |
45 | border: 1px solid black;
46 |
47 | // padding & margin //
48 | padding: 0; // }{ '"
49 | margin: 2em;
50 | } //
51 |
52 | /* commented out
53 | #more-comments {
54 | color: grey;
55 | }
56 | */
57 |
58 | .selector /* .with */, .lots, /* of */ .comments {
59 | color: grey, /* blue */ orange;
60 | -webkit-border-radius: 2px /* webkit only */;
61 | -moz-border-radius: 2px * 4 /* moz only with operation */;
62 | }
63 |
64 | #last { color: blue }
65 | //
66 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/css-3.less:
--------------------------------------------------------------------------------
1 | .comma-delimited {
2 | background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg);
3 | text-shadow: -1px -1px 1px red, 6px 5px 5px yellow;
4 | -moz-box-shadow: 0pt 0pt 2px rgba(255, 255, 255, 0.4) inset,
5 | 0pt 4px 6px rgba(255, 255, 255, 0.4) inset;
6 | }
7 | @font-face {
8 | font-family: Headline;
9 | src: local(Futura-Medium),
10 | url(fonts.svg#MyGeometricModern) format("svg");
11 | }
12 | .other {
13 | -moz-transform: translate(0, 11em) rotate(-90deg);
14 | }
15 | p:not([class*="lead"]) {
16 | color: black;
17 | }
18 |
19 | input[type="text"].class#id[attr=32]:not(1) {
20 | color: white;
21 | }
22 |
23 | div#id.class[a=1][b=2].class:not(1) {
24 | color: white;
25 | }
26 |
27 | ul.comma > li:not(:only-child)::after {
28 | color: white;
29 | }
30 |
31 | ol.comma > li:nth-last-child(2)::after {
32 | color: white;
33 | }
34 |
35 | li:nth-child(4n+1),
36 | li:nth-child(-5n),
37 | li:nth-child(-n+2) {
38 | color: white;
39 | }
40 |
41 | a[href^="http://"] {
42 | color: black;
43 | }
44 |
45 | a[href$="http://"] {
46 | color: black;
47 | }
48 |
49 | form[data-disabled] {
50 | color: black;
51 | }
52 |
53 | p::before {
54 | color: black;
55 | }
56 |
57 | #issue322 {
58 | -webkit-animation: anim2 7s infinite ease-in-out;
59 | }
60 |
61 | @-webkit-keyframes frames {
62 | 0% { border: 1px }
63 | 5.5% { border: 2px }
64 | 100% { border: 3px }
65 | }
66 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/css-escapes.less:
--------------------------------------------------------------------------------
1 | @ugly: fuchsia;
2 |
3 | .escape\|random\|char {
4 | color: red;
5 | }
6 |
7 | .mixin\!tUp {
8 | font-weight: bold;
9 | }
10 |
11 | // class="404"
12 | .\34 04 {
13 | background: red;
14 |
15 | strong {
16 | color: @ugly;
17 | .mixin\!tUp;
18 | }
19 | }
20 |
21 | .trailingTest\+ {
22 | color: red;
23 | }
24 |
25 | /* This hideous test of hideousness checks for the selector "blockquote" with various permutations of hex escapes */
26 | \62\6c\6f \63 \6B \0071 \000075o\74 e {
27 | color: silver;
28 | }
29 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/css.less:
--------------------------------------------------------------------------------
1 | @charset "utf-8";
2 | div { color: black; }
3 | div { width: 99%; }
4 |
5 | * {
6 | min-width: 45em;
7 | }
8 |
9 | h1, h2 > a > p, h3 {
10 | color: none;
11 | }
12 |
13 | div.class {
14 | color: blue;
15 | }
16 |
17 | div#id {
18 | color: green;
19 | }
20 |
21 | .class#id {
22 | color: purple;
23 | }
24 |
25 | .one.two.three {
26 | color: grey;
27 | }
28 |
29 | @media print {
30 | font-size: 3em;
31 | }
32 |
33 | @media screen {
34 | font-size: 10px;
35 | }
36 |
37 | @font-face {
38 | font-family: 'Garamond Pro';
39 | src: url("/fonts/garamond-pro.ttf");
40 | }
41 |
42 | a:hover, a:link {
43 | color: #999;
44 | }
45 |
46 | p, p:first-child {
47 | text-transform: none;
48 | }
49 |
50 | q:lang(no) {
51 | quotes: none;
52 | }
53 |
54 | p + h1 {
55 | font-size: 2.2em;
56 | }
57 |
58 | #shorthands {
59 | border: 1px solid #000;
60 | font: 12px/16px Arial;
61 | font: 100%/16px Arial;
62 | margin: 1px 0;
63 | padding: 0 auto;
64 | background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
65 | }
66 |
67 | #more-shorthands {
68 | margin: 0;
69 | padding: 1px 0 2px 0;
70 | font: normal small/20px 'Trebuchet MS', Verdana, sans-serif;
71 | }
72 |
73 | .misc {
74 | -moz-border-radius: 2px;
75 | display: -moz-inline-stack;
76 | width: .1em;
77 | background-color: #009998;
78 | background-image: url(images/image.jpg);
79 | background: -webkit-gradient(linear, left top, left bottom, from(red), to(blue));
80 | margin: ;
81 | filter: alpha(opacity=100);
82 | }
83 |
84 | #important {
85 | color: red !important;
86 | width: 100%!important;
87 | height: 20px ! important;
88 | }
89 |
90 | #data-uri {
91 | background: url(data:image/png;charset=utf-8;base64,
92 | kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
93 | k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
94 | kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
95 | background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
96 | }
97 |
98 | #svg-data-uri {
99 | background: transparent url('data:image/svg+xml, ');
100 | }
101 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/functions.less:
--------------------------------------------------------------------------------
1 | #functions {
2 | @var: 10;
3 | color: _color("evil red"); // #660000
4 | width: increment(15);
5 | height: undefined("self");
6 | border-width: add(2, 3);
7 | variable: increment(@var);
8 | }
9 |
10 | #built-in {
11 | @r: 32;
12 | escaped: e("-Some::weird(#thing, y)");
13 | lighten: lighten(#ff0000, 40%);
14 | darken: darken(#ff0000, 40%);
15 | saturate: saturate(#29332f, 20%);
16 | desaturate: desaturate(#203c31, 20%);
17 | greyscale: greyscale(#203c31);
18 | spin-p: spin(hsl(340, 50%, 50%), 40);
19 | spin-n: spin(hsl(30, 50%, 50%), -40);
20 | format: %("rgb(%d, %d, %d)", @r, 128, 64);
21 | format-string: %("hello %s", "world");
22 | format-multiple: %("hello %s %d", "earth", 2);
23 | format-url-encode: %('red is %A', #ff0000);
24 | eformat: e(%("rgb(%d, %d, %d)", @r, 128, 64));
25 |
26 | hue: hue(hsl(98, 12%, 95%));
27 | saturation: saturation(hsl(98, 12%, 95%));
28 | lightness: lightness(hsl(98, 12%, 95%));
29 | rounded: round(@r/3);
30 | roundedpx: round(10px / 3);
31 | percentage: percentage(10px / 50);
32 | color: color("#ff0011");
33 |
34 | .is-a {
35 | color: iscolor(#ddd);
36 | color: iscolor(red);
37 | color: iscolor(rgb(0, 0, 0));
38 | keyword: iskeyword(hello);
39 | number: isnumber(32);
40 | string: isstring("hello");
41 | pixel: ispixel(32px);
42 | percent: ispercentage(32%);
43 | em: isem(32em);
44 | }
45 | }
46 |
47 | #alpha {
48 | alpha: darken(hsla(25, 50%, 50%, 0.6), 10%);
49 | }
50 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/ie-filters.less:
--------------------------------------------------------------------------------
1 | @fat: 0;
2 | @cloudhead: "#000000";
3 |
4 | .nav {
5 | filter: progid:DXImageTransform.Microsoft.Alpha(opacity = 20);
6 | filter: progid:DXImageTransform.Microsoft.Alpha(opacity=@fat);
7 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#333333", endColorstr=@cloudhead, GradientType=@fat);
8 | }
9 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/import.less:
--------------------------------------------------------------------------------
1 | @import url("import/import-test-a.less");
2 | @import url("import/import-test-a.less");
3 |
4 | @import url(http://fonts.googleapis.com/css?family=Open+Sans);
5 |
6 | @import url(something.css) screen and (color) and (max-width: 600px);
7 |
8 | #import-test {
9 | .mixin;
10 | width: 10px;
11 | height: @a + 10%;
12 | }
13 | @import "import/import-test-e" screen and (max-width: 600px);
14 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/import/import-test-a.less:
--------------------------------------------------------------------------------
1 | @import "import-test-b.less";
2 | @a: 20%;
3 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/import/import-test-b.less:
--------------------------------------------------------------------------------
1 | @import "import-test-c";
2 |
3 | @b: 100%;
4 |
5 | .mixin {
6 | height: 10px;
7 | color: @c;
8 | }
9 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/import/import-test-c.less:
--------------------------------------------------------------------------------
1 |
2 | @import "import-test-d.css";
3 | @c: red;
4 |
5 | #import {
6 | color: @c;
7 | }
8 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/import/import-test-d.css:
--------------------------------------------------------------------------------
1 | #css { color: yellow; }
2 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/import/import-test-e.less:
--------------------------------------------------------------------------------
1 |
2 | body { width: 100% }
3 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/import_custom.less:
--------------------------------------------------------------------------------
1 | @import url("import/import-test-a.less");
2 |
3 | @import url(http://fonts.googleapis.com/css?family=Open+Sans);
4 |
5 | @import url(something.css) screen and (color) and (max-width: 600px);
6 |
7 | #import-test {
8 | .mixin;
9 | width: 10px;
10 | height: @a + 10%;
11 | }
12 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/javascript.less:
--------------------------------------------------------------------------------
1 | .eval {
2 | js: `42`;
3 | js: `1 + 1`;
4 | js: `"hello world"`;
5 | js: `[1, 2, 3]`;
6 | title: `process.title`;
7 | ternary: `(1 + 1 == 2 ? true : false)`;
8 | }
9 | .scope {
10 | @foo: 42;
11 | var: `this.foo.toJS()`;
12 | escaped: ~`2 + 5 + 'px'`;
13 | }
14 | .vars {
15 | @var: `4 + 4`;
16 | width: @var;
17 | }
18 | .escape-interpol {
19 | @world: "world";
20 | width: ~`"hello" + " " + @{world}`;
21 | }
22 | .arrays {
23 | @ary: 1, 2, 3;
24 | @ary2: 1 2 3;
25 | ary: `@{ary}.join(', ')`;
26 | ary: `@{ary2}.join(', ')`;
27 | }
28 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/lazy-eval.less:
--------------------------------------------------------------------------------
1 | @var: @a;
2 | @a: 100%;
3 |
4 | .lazy-eval {
5 | width: @var;
6 | }
7 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/media.less:
--------------------------------------------------------------------------------
1 |
2 | // For now, variables can't be declared inside @media blocks.
3 |
4 | @var: 42;
5 |
6 | @media print {
7 | .class {
8 | color: blue;
9 | .sub {
10 | width: @var;
11 | }
12 | }
13 | .top, header > h1 {
14 | color: #222 * 2;
15 | }
16 | }
17 |
18 | @media screen {
19 | @base: 8;
20 | body { max-width: @base * 60; }
21 | }
22 |
23 | @media all and (orientation:portrait) {
24 | aside { float: none; }
25 | }
26 |
27 | @media handheld and (min-width: @var), screen and (min-width: 20em) {
28 | body {
29 | max-width: 480px;
30 | }
31 | }
32 |
33 | body {
34 | @media print {
35 | padding: 20px;
36 |
37 | header {
38 | background-color: red;
39 | }
40 |
41 | @media (orientation:landscape) {
42 | margin-left: 20px;
43 | }
44 | }
45 | }
46 |
47 | body {
48 | @media a, b and c {
49 | width: 95%;
50 |
51 | @media x, y {
52 | width: 100%;
53 | }
54 | }
55 | }
56 |
57 | .mediaMixin(@fallback: 200px) {
58 | background: black;
59 |
60 | @media handheld {
61 | background: white;
62 |
63 | @media (max-width: @fallback) {
64 | background: red;
65 | }
66 | }
67 | }
68 |
69 | .a {
70 | .mediaMixin(100px);
71 | }
72 |
73 | .b {
74 | .mediaMixin();
75 | }
76 | @smartphone: ~"only screen and (max-width: 200px)";
77 | @media @smartphone {
78 | width: 480px;
79 | }
80 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/mixins-args.less:
--------------------------------------------------------------------------------
1 | .mixin (@a: 1px, @b: 50%) {
2 | width: @a * 5;
3 | height: @b - 1%;
4 | }
5 |
6 | .mixina (@style, @width, @color: black) {
7 | border: @width @style @color;
8 | }
9 |
10 | .mixiny
11 | (@a: 0, @b: 0) {
12 | margin: @a;
13 | padding: @b;
14 | }
15 |
16 | .hidden() {
17 | color: transparent; // asd
18 | }
19 |
20 | #hidden {
21 | .hidden;
22 | .hidden();
23 | }
24 |
25 | .two-args {
26 | color: blue;
27 | .mixin(2px, 100%);
28 | .mixina(dotted, 2px);
29 | }
30 |
31 | .one-arg {
32 | .mixin(3px);
33 | }
34 |
35 | .no-parens {
36 | .mixin;
37 | }
38 |
39 | .no-args {
40 | .mixin();
41 | }
42 |
43 | .var-args {
44 | @var: 9;
45 | .mixin(@var, @var * 2);
46 | }
47 |
48 | .multi-mix {
49 | .mixin(2px, 30%);
50 | .mixiny(4, 5);
51 | }
52 |
53 | .maxa(@arg1: 10, @arg2: #f00) {
54 | padding: @arg1 * 2px;
55 | color: @arg2;
56 | }
57 |
58 | body {
59 | .maxa(15);
60 | }
61 |
62 | @glob: 5;
63 | .global-mixin(@a:2) {
64 | width: @glob + @a;
65 | }
66 |
67 | .scope-mix {
68 | .global-mixin(3);
69 | }
70 |
71 | .nested-ruleset (@width: 200px) {
72 | width: @width;
73 | .column { margin: @width; }
74 | }
75 | .content {
76 | .nested-ruleset(600px);
77 | }
78 |
79 | //
80 |
81 | .same-var-name2(@radius) {
82 | radius: @radius;
83 | }
84 | .same-var-name(@radius) {
85 | .same-var-name2(@radius);
86 | }
87 | #same-var-name {
88 | .same-var-name(5px);
89 | }
90 |
91 | //
92 |
93 | .var-inside () {
94 | @var: 10px;
95 | width: @var;
96 | }
97 | #var-inside { .var-inside; }
98 |
99 | // # mixins
100 |
101 | #id-mixin () {
102 | color: red;
103 | }
104 | .id-class {
105 | #id-mixin();
106 | #id-mixin;
107 | }
108 |
109 | .mixin-arguments (@width: 0px, ...) {
110 | border: @arguments;
111 | width: @width;
112 | }
113 |
114 | .arguments {
115 | .mixin-arguments(1px, solid, black);
116 | }
117 | .arguments2 {
118 | .mixin-arguments();
119 | }
120 | .arguments3 {
121 | .mixin-arguments;
122 | }
123 |
124 | .mixin-arguments2 (@width, @rest...) {
125 | border: @arguments;
126 | rest: @rest;
127 | width: @width;
128 | }
129 | .arguments4 {
130 | .mixin-arguments2(0, 1, 2, 3, 4);
131 | }
132 |
133 | // Edge cases
134 |
135 | .edge-case {
136 | .mixin-arguments("{");
137 | }
138 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/mixins-closure.less:
--------------------------------------------------------------------------------
1 | .scope {
2 | @var: 99px;
3 | .mixin () {
4 | width: @var;
5 | }
6 | }
7 |
8 | .class {
9 | .scope > .mixin;
10 | }
11 |
12 | .overwrite {
13 | @var: 0px;
14 | .scope > .mixin;
15 | }
16 |
17 | .nested {
18 | @var: 5px;
19 | .mixin () {
20 | width: @var;
21 | }
22 | .class {
23 | @var: 10px;
24 | .mixin;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/mixins-guards.less:
--------------------------------------------------------------------------------
1 |
2 | // Stacking, functions..
3 |
4 | .light (@a) when (lightness(@a) > 50%) {
5 | color: white;
6 | }
7 | .light (@a) when (lightness(@a) < 50%) {
8 | color: black;
9 | }
10 | .light (@a) {
11 | margin: 1px;
12 | }
13 |
14 | .light1 { .light(#ddd) }
15 | .light2 { .light(#444) }
16 |
17 | // Arguments against each other
18 |
19 | .max (@a, @b) when (@a > @b) {
20 | width: @a;
21 | }
22 | .max (@a, @b) when (@a < @b) {
23 | width: @b;
24 | }
25 |
26 | .max1 { .max(3, 6) }
27 | .max2 { .max(8, 1) }
28 |
29 | // Globals inside guards
30 |
31 | @g: auto;
32 |
33 | .glob (@a) when (@a = @g) {
34 | margin: @a @g;
35 | }
36 | .glob1 { .glob(auto) }
37 |
38 | // Other operators
39 |
40 | .ops (@a) when (@a >= 0) {
41 | height: gt-or-eq;
42 | }
43 | .ops (@a) when (@a =< 0) {
44 | height: lt-or-eq;
45 | }
46 | .ops (@a) when not(@a = 0) {
47 | height: not-eq;
48 | }
49 | .ops1 { .ops(0) }
50 | .ops2 { .ops(1) }
51 | .ops3 { .ops(-1) }
52 |
53 | // Scope and default values
54 |
55 | @a: auto;
56 |
57 | .default (@a: inherit) when (@a = inherit) {
58 | content: default;
59 | }
60 | .default1 { .default }
61 |
62 | // true & false keywords
63 | .test (@a) when (@a) {
64 | content: "true.";
65 | }
66 | .test (@a) when not (@a) {
67 | content: "false.";
68 | }
69 |
70 | .test1 { .test(true) }
71 | .test2 { .test(false) }
72 | .test3 { .test(1) }
73 | .test4 { .test(boo) }
74 | .test5 { .test("true") }
75 |
76 | // Boolean expressions
77 |
78 | .bool () when (true) and (false) { content: true and false } // FALSE
79 | .bool () when (true) and (true) { content: true and true } // TRUE
80 | .bool () when (true) { content: true } // TRUE
81 | .bool () when (false) and (false) { content: true } // FALSE
82 | .bool () when (false), (true) { content: false, true } // TRUE
83 | .bool () when (false) and (true) and (true), (true) { content: false and true and true, true } // TRUE
84 | .bool () when (true) and (true) and (false), (false) { content: true and true and false, false } // FALSE
85 | .bool () when (false), (true) and (true) { content: false, true and true } // TRUE
86 | .bool () when (false), (false), (true) { content: false, false, true } // TRUE
87 | .bool () when (false), (false) and (true), (false) { content: false, false and true, false } // FALSE
88 | .bool () when (false), (true) and (true) and (true), (false) { content: false, true and true and true, false } // TRUE
89 | .bool () when not (false) { content: not false }
90 | .bool () when not (true) and not (false) { content: not true and not false }
91 | .bool () when not (true) and not (true) { content: not true and not true }
92 | .bool () when not (false) and (false), not (false) { content: not false and false, not false }
93 |
94 | .bool1 { .bool }
95 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/mixins-important.less:
--------------------------------------------------------------------------------
1 |
2 | .mixin (9) {
3 | border: 9 !important;
4 | }
5 | .mixin (@a: 0) {
6 | border: @a;
7 | boxer: @a;
8 | }
9 |
10 | .class {
11 | .mixin(1);
12 | .mixin(2) !important;
13 | .mixin(3);
14 | .mixin(4) !important;
15 | .mixin(5);
16 | .mixin !important;
17 | .mixin(9);
18 | }
19 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/mixins-nested.less:
--------------------------------------------------------------------------------
1 | .mix-inner (@var) {
2 | border-width: @var;
3 | }
4 |
5 | .mix (@a: 10) {
6 | .inner {
7 | height: @a * 10;
8 |
9 | .innest {
10 | width: @a;
11 | .mix-inner(@a * 2);
12 | }
13 | }
14 | }
15 |
16 | .class {
17 | .mix(30);
18 | }
19 |
20 | .class2 {
21 | .mix(60);
22 | }
23 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/mixins-pattern.less:
--------------------------------------------------------------------------------
1 | .mixin (...) {
2 | variadic: true;
3 | }
4 | .mixin () {
5 | zero: 0;
6 | }
7 | .mixin (@a: 1px) {
8 | one: 1;
9 | }
10 | .mixin (@a) {
11 | one-req: 1;
12 | }
13 | .mixin (@a: 1px, @b: 2px) {
14 | two: 2;
15 | }
16 |
17 | .mixin (@a, @b, @c) {
18 | three-req: 3;
19 | }
20 |
21 | .mixin (@a: 1px, @b: 2px, @c: 3px) {
22 | three: 3;
23 | }
24 |
25 | .zero {
26 | .mixin();
27 | }
28 |
29 | .one {
30 | .mixin(1);
31 | }
32 |
33 | .two {
34 | .mixin(1, 2);
35 | }
36 |
37 | .three {
38 | .mixin(1, 2, 3);
39 | }
40 |
41 | //
42 |
43 | .mixout ('left') {
44 | left: 1;
45 | }
46 |
47 | .mixout ('right') {
48 | right: 1;
49 | }
50 |
51 | .left {
52 | .mixout('left');
53 | }
54 | .right {
55 | .mixout('right');
56 | }
57 |
58 | //
59 |
60 | .border (@side, @width) {
61 | color: black;
62 | .border-side(@side, @width);
63 | }
64 | .border-side (left, @w) {
65 | border-left: @w;
66 | }
67 | .border-side (right, @w) {
68 | border-right: @w;
69 | }
70 |
71 | .border-right {
72 | .border(right, 4px);
73 | }
74 | .border-left {
75 | .border(left, 4px);
76 | }
77 |
78 | //
79 |
80 |
81 | .border-radius (@r) {
82 | both: @r * 10;
83 | }
84 | .border-radius (@r, left) {
85 | left: @r;
86 | }
87 | .border-radius (@r, right) {
88 | right: @r;
89 | }
90 |
91 | .only-right {
92 | .border-radius(33, right);
93 | }
94 | .only-left {
95 | .border-radius(33, left);
96 | }
97 | .left-right {
98 | .border-radius(33);
99 | }
100 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/mixins.less:
--------------------------------------------------------------------------------
1 | .mixin { border: 1px solid black; }
2 | .mixout { border-color: orange; }
3 | .borders { border-style: dashed; }
4 |
5 | #namespace {
6 | .borders {
7 | border-style: dotted;
8 | }
9 | .biohazard {
10 | content: "death";
11 | .man {
12 | color: transparent;
13 | }
14 | }
15 | }
16 | #theme {
17 | > .mixin {
18 | background-color: grey;
19 | }
20 | }
21 | #container {
22 | color: black;
23 | .mixin;
24 | .mixout;
25 | #theme > .mixin;
26 | }
27 |
28 | #header {
29 | .milk {
30 | color: white;
31 | .mixin;
32 | #theme > .mixin;
33 | }
34 | #cookie {
35 | .chips {
36 | #namespace .borders;
37 | .calories {
38 | #container;
39 | }
40 | }
41 | .borders;
42 | }
43 | }
44 | .secure-zone { #namespace .biohazard .man; }
45 | .direct {
46 | #namespace > .borders;
47 | }
48 |
49 | .bo, .bar {
50 | width: 100%;
51 | }
52 | .bo {
53 | border: 1px;
54 | }
55 | .ar.bo.ca {
56 | color: black;
57 | }
58 | .jo.ki {
59 | background: none;
60 | }
61 | .extended {
62 | .bo;
63 | .jo.ki;
64 | }
65 | .foo .bar {
66 | .bar;
67 | }
68 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/operations.less:
--------------------------------------------------------------------------------
1 | #operations {
2 | color: #110000 + #000011 + #001100; // #111111
3 | height: 10px / 2px + 6px - 1px * 2; // 9px
4 | width: 2 * 4 - 5em; // 3em
5 | .spacing {
6 | height: 10px / 2px+6px-1px*2;
7 | width: 2 * 4-5em;
8 | }
9 | substraction: 20 - 10 - 5 - 5; // 0
10 | division: 20 / 5 / 4; // 1
11 | }
12 |
13 | @x: 4;
14 | @y: 12em;
15 |
16 | .with-variables {
17 | height: @x + @y; // 16em
18 | width: 12 + @y; // 24em
19 | size: 5cm - @x; // 1cm
20 | }
21 |
22 | .with-functions {
23 | color: rgb(200, 200, 200) / 2;
24 | color: 2 * hsl(0, 50%, 50%);
25 | color: rgb(10, 10, 10) + hsl(0, 50%, 50%);
26 | }
27 |
28 | @z: -2;
29 |
30 | .negative {
31 | height: 2px + @z; // 0px
32 | width: 2px - @z; // 4px
33 | }
34 |
35 | .shorthands {
36 | padding: -1px 2px 0 -4px; //
37 | }
38 |
39 | .rem-dimensions {
40 | font-size: 20rem / 5 + 1.5rem; // 5.5rem
41 | }
42 |
43 | .colors {
44 | color: #123; // #112233
45 | border-color: #234 + #111111; // #334455
46 | background-color: #222222 - #fff; // #000000
47 | .other {
48 | color: 2 * #111; // #222222
49 | border-color: #333333 / 3 + #111; // #222222
50 | }
51 | }
52 |
53 | .negations {
54 | @var: 4px;
55 | variable: -@var; // 4
56 | variable1: -@var + @var; // 0
57 | variable2: @var + -@var; // 0
58 | variable3: @var - -@var; // 8
59 | variable4: -@var - -@var; // 0
60 | paren: -(@var); // -4px
61 | paren2: -(2 + 2) * -@var; // 16
62 | }
63 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/parens.less:
--------------------------------------------------------------------------------
1 | .parens {
2 | @var: 1px;
3 | border: (@var * 2) solid black;
4 | margin: (@var * 1) (@var + 2) (4 * 4) 3;
5 | width: (6 * 6);
6 | padding: 2px (6px * 6px);
7 | }
8 |
9 | .more-parens {
10 | @var: (2 * 2);
11 | padding: (2 * @var) 4 4 (@var * 1px);
12 | width: (@var * @var) * 6;
13 | height: (7 * 7) + (8 * 8);
14 | margin: 4 * (5 + 5) / 2 - (@var * 2);
15 | //margin: (6 * 6)px;
16 | }
17 |
18 | .nested-parens {
19 | width: 2 * (4 * (2 + (1 + 6))) - 1;
20 | height: ((2+3)*(2+3) / (9-4)) + 1;
21 | }
22 |
23 | .mixed-units {
24 | margin: 2px 4em 1 5pc;
25 | padding: (2px + 4px) 1em 2px 2;
26 | }
27 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/rulesets.less:
--------------------------------------------------------------------------------
1 | #first > .one {
2 | > #second .two > #deux {
3 | width: 50%;
4 | #third {
5 | &:focus {
6 | color: black;
7 | #fifth {
8 | > #sixth {
9 | .seventh #eighth {
10 | + #ninth {
11 | color: purple;
12 | }
13 | }
14 | }
15 | }
16 | }
17 | height: 100%;
18 | }
19 | #fourth, #five, #six {
20 | color: #110000;
21 | .seven, .eight > #nine {
22 | border: 1px solid black;
23 | }
24 | #ten {
25 | color: red;
26 | }
27 | }
28 | }
29 | font-size: 2em;
30 | }
31 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/scope.less:
--------------------------------------------------------------------------------
1 | @x: blue;
2 | @z: transparent;
3 | @mix: none;
4 |
5 | .mixin {
6 | @mix: #989;
7 | }
8 |
9 | .tiny-scope {
10 | color: @mix; // #989
11 | .mixin;
12 | }
13 |
14 | .scope1 {
15 | @y: orange;
16 | @z: black;
17 | color: @x; // blue
18 | border-color: @z; // black
19 | .hidden {
20 | @x: #131313;
21 | }
22 | .scope2 {
23 | @y: red;
24 | color: @x; // blue
25 | .scope3 {
26 | @local: white;
27 | color: @y; // red
28 | border-color: @z; // black
29 | background-color: @local; // white
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/selectors.less:
--------------------------------------------------------------------------------
1 | h1, h2, h3 {
2 | a, p {
3 | &:hover {
4 | color: red;
5 | }
6 | }
7 | }
8 |
9 | #all { color: blue; }
10 | #the { color: blue; }
11 | #same { color: blue; }
12 |
13 | ul, li, div, q, blockquote, textarea {
14 | margin: 0;
15 | }
16 |
17 | td {
18 | margin: 0;
19 | padding: 0;
20 | }
21 |
22 | td, input {
23 | line-height: 1em;
24 | }
25 |
26 | a {
27 | color: red;
28 |
29 | &:hover { color: blue; }
30 |
31 | div & { color: green; }
32 |
33 | p & span { color: yellow; }
34 | }
35 |
36 | .foo {
37 | .bar, .baz {
38 | & .qux {
39 | display: block;
40 | }
41 | .qux & {
42 | display: inline;
43 | }
44 | .qux & .biz {
45 | display: none;
46 | }
47 | }
48 | }
49 |
50 | .other ::fnord { color: red }
51 | .other::fnord { color: red }
52 | .other {
53 | ::bnord {color: red }
54 | &::bnord {color: red }
55 | }
56 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/strings.less:
--------------------------------------------------------------------------------
1 | #strings {
2 | background-image: url("http://son-of-a-banana.com");
3 | quotes: "~" "~";
4 | content: "#*%:&^,)!.(~*})";
5 | empty: "";
6 | brackets: "{" "}";
7 | escapes: "\"hello\" \\world";
8 | escapes2: "\"llo";
9 | }
10 | #comments {
11 | content: "/* hello */ // not-so-secret";
12 | }
13 | #single-quote {
14 | quotes: "'" "'";
15 | content: '""#!&""';
16 | empty: '';
17 | semi-colon: ';';
18 | }
19 | #escaped {
20 | filter: ~"DX.Transform.MS.BS.filter(opacity=50)";
21 | }
22 | #one-line { image: url(http://tooks.com) }
23 | #crazy { image: url(http://), "}", url("http://}") }
24 | #interpolation {
25 | @var: '/dev';
26 | url: "http://lesscss.org@{var}/image.jpg";
27 |
28 | @var2: 256;
29 | url2: "http://lesscss.org/image-@{var2}.jpg";
30 |
31 | @var3: #456;
32 | url3: "http://lesscss.org@{var3}";
33 |
34 | @var4: hello;
35 | url4: "http://lesscss.org/@{var4}";
36 |
37 | @var5: 54.4px;
38 | url5: "http://lesscss.org/@{var5}";
39 | }
40 |
41 | // multiple calls with string interpolation
42 |
43 | .mix-mul (@a: green) {
44 | color: ~"@{a}";
45 | }
46 | .mix-mul-class {
47 | .mix-mul(blue);
48 | .mix-mul(red);
49 | .mix-mul(blue);
50 | .mix-mul(orange);
51 | }
52 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/variables.less:
--------------------------------------------------------------------------------
1 | @a: 2;
2 | @x: @a * @a;
3 | @y: @x + 1;
4 | @z: @x * 2 + @y;
5 |
6 | .variables {
7 | width: @z + 1cm; // 14cm
8 | }
9 |
10 | @b: @a * 10;
11 | @c: #888;
12 |
13 | @fonts: "Trebuchet MS", Verdana, sans-serif;
14 | @f: @fonts;
15 |
16 | @quotes: "~" "~";
17 | @q: @quotes;
18 |
19 | .variables {
20 | height: @b + @x + 0px; // 24px
21 | color: @c;
22 | font-family: @f;
23 | quotes: @q;
24 | }
25 |
26 | .redefinition {
27 | @var: 4;
28 | @var: 2;
29 | @var: 3;
30 | three: @var;
31 | }
32 |
33 | .values {
34 | @a: 'Trebuchet';
35 | @multi: 'A', B, C;
36 | font-family: @a, @a, @a;
37 | color: @c !important;
38 | url: url(@a);
39 | multi: something @multi, @a;
40 | }
41 |
42 | .variable-names {
43 | @var: 'hello';
44 | @name: 'var';
45 | name: @@name;
46 | }
47 | .alpha {
48 | @var: 42;
49 | filter: alpha(opacity=@var);
50 | }
51 |
52 | a:nth-child(@{a}) {
53 | border: 1px;
54 | }
55 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/less/whitespace.less:
--------------------------------------------------------------------------------
1 |
2 |
3 | .whitespace
4 | { color: white; }
5 |
6 | .whitespace
7 | {
8 | color: white;
9 | }
10 | .whitespace
11 | { color: white; }
12 |
13 | .whitespace{color:white;}
14 | .whitespace { color : white ; }
15 |
16 | .white,
17 | .space,
18 | .mania
19 | { color: white; }
20 |
21 | .no-semi-column { color: white }
22 | .no-semi-column {
23 | color: white;
24 | white-space: pre
25 | }
26 | .no-semi-column {border: 2px solid white}
27 | .newlines {
28 | background: the,
29 | great,
30 | wall;
31 | border: 2px
32 | solid
33 | black;
34 | }
35 | .empty {
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/test/resources/compatibility/utf8-content.less:
--------------------------------------------------------------------------------
1 | .sort-true::before{ content:'↓ '; }
2 |
--------------------------------------------------------------------------------
/src/test/resources/env.rhino.test.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloverdijk/lesscss-java/a7102a49d891b034b3dbcc6e5ccd74fbb3d2fa05/src/test/resources/env.rhino.test.js
--------------------------------------------------------------------------------
/src/test/resources/import/css/import.css:
--------------------------------------------------------------------------------
1 | import1a {
2 | color: blue;
3 | }
4 | import1b {
5 | color: blue;
6 | }
7 | import4 {
8 | color: blue;
9 | }
10 | @media screen {
11 | import5 {
12 | color: green;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/test/resources/import/endsinless/css/import.css:
--------------------------------------------------------------------------------
1 | iendinless {
2 | color: blue;
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/import/endsinless/less/iendinless.less:
--------------------------------------------------------------------------------
1 | iendinless {
2 | color: blue;
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/import/endsinless/less/import.less:
--------------------------------------------------------------------------------
1 | @import "iendinless";
2 |
--------------------------------------------------------------------------------
/src/test/resources/import/less/http_import.less:
--------------------------------------------------------------------------------
1 | //@import "http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css";
2 | @import "https://raw2.github.com/FortAwesome/Font-Awesome/master/less/font-awesome.less";
3 |
4 | body {
5 | background-color: #eeeeee;
6 | }
--------------------------------------------------------------------------------
/src/test/resources/import/less/import.less:
--------------------------------------------------------------------------------
1 | @import "import1.less";
2 | //@import "import2.less";
3 | // @import "import3.less";
4 | @import "import4";
5 |
6 | @media screen { @import "import5"; }
--------------------------------------------------------------------------------
/src/test/resources/import/less/import1.less:
--------------------------------------------------------------------------------
1 | @import "import1/import1a.less";
2 | @import "import1/import1b.less";
3 | // @import "import1/import1c.less";
--------------------------------------------------------------------------------
/src/test/resources/import/less/import1/import1a.less:
--------------------------------------------------------------------------------
1 | import1a {
2 | color: blue;
3 | }
--------------------------------------------------------------------------------
/src/test/resources/import/less/import1/import1b.less:
--------------------------------------------------------------------------------
1 | import1b {
2 | color: blue;
3 | }
--------------------------------------------------------------------------------
/src/test/resources/import/less/import1/import1c.less:
--------------------------------------------------------------------------------
1 | import1c {
2 | color: blue;
3 | }
--------------------------------------------------------------------------------
/src/test/resources/import/less/import4.less:
--------------------------------------------------------------------------------
1 | import4 {
2 | color: blue;
3 | }
--------------------------------------------------------------------------------
/src/test/resources/import/less/import5.less:
--------------------------------------------------------------------------------
1 | import5 {
2 | color: green;
3 | }
--------------------------------------------------------------------------------
/src/test/resources/import/less/import_quotes.less:
--------------------------------------------------------------------------------
1 | @import 'import1.less';
2 | //@import 'import2.less';
3 | // @import 'import3.less';
4 | @import "import4";
5 |
6 | @media screen { @import 'import5'; }
--------------------------------------------------------------------------------
/src/test/resources/less.test.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloverdijk/lesscss-java/a7102a49d891b034b3dbcc6e5ccd74fbb3d2fa05/src/test/resources/less.test.js
--------------------------------------------------------------------------------