Warning, /webapps/ocs-webserver/library/lessphp/tests/inputs/site_demos.less is written in an unsupported language. File is not indexed.
0001 // these are the demos from the lessphp homepage 0002 0003 default { 0004 @base: 24px; 0005 @border-color: #B2B; 0006 0007 .underline { border-bottom: 1px solid green } 0008 0009 #header { 0010 color: black; 0011 border: 1px solid @border-color + #222222; 0012 0013 .navigation { 0014 font-size: @base / 2; 0015 a { 0016 .underline; 0017 } 0018 } 0019 .logo { 0020 width: 300px; 0021 &:hover { text-decoration: none } 0022 } 0023 } 0024 } 0025 0026 variables { 0027 @a: 2; 0028 @x: @a * @a; 0029 @y: @x + 1; 0030 @z: @x * 2 + @y; 0031 0032 @nice-blue: #5B83AD; 0033 @light-blue: @nice-blue + #111; 0034 0035 @b: @a * 10; 0036 @c: #888; 0037 @fonts: "Trebuchet MS", Verdana, sans-serif; 0038 0039 .variables { 0040 width: @z + 1cm; // 14cm 0041 height: @b + @x + 0px; // 24px 0042 color: @c; 0043 background: @light-blue; 0044 font-family: @fonts; 0045 } 0046 } 0047 0048 mixins { 0049 .bordered { 0050 border-top: dotted 1px black; 0051 border-bottom: solid 2px black; 0052 } 0053 #menu a { 0054 color: #111; 0055 .bordered; 0056 } 0057 0058 .post a { 0059 color: red; 0060 .bordered; 0061 } 0062 } 0063 0064 nested-rules { 0065 #header { 0066 color: black; 0067 0068 .navigation { 0069 font-size: 12px; 0070 } 0071 .logo { 0072 width: 300px; 0073 &:hover { text-decoration: none } 0074 } 0075 } 0076 } 0077 0078 namespaces { 0079 #bundle { 0080 .button { 0081 display: block; 0082 border: 1px solid black; 0083 background-color: grey; 0084 &:hover { background-color: white } 0085 } 0086 } 0087 #header a { 0088 color: orange; 0089 #bundle > .button; // mixin the button class 0090 } 0091 } 0092 0093 mixin-functions { 0094 @outer: 10px; 0095 @class(@var:22px, @car: 400px + @outer) { 0096 margin: @var; 0097 height: @car; 0098 } 0099 0100 @group { 0101 @f(@color) { 0102 color: @color; 0103 } 0104 .cool { 0105 border-bottom: 1px solid green; 0106 } 0107 } 0108 0109 .class(@width:200px) { 0110 padding: @width; 0111 } 0112 0113 body { 0114 .class(2.0em); 0115 @group > @f(red); 0116 @class(10px, 10px + 2); 0117 @group > .cool; 0118 } 0119 } 0120