]> git.mxchange.org Git - friendica.git/blob - view/theme/dispy/dark/_base.less
Merge pull request #315 from simonlnu/master
[friendica.git] / view / theme / dispy / dark / _base.less
1 // _base.less
2 //
3 // the base file for dispy's dark "sub-theme".
4 //
5 // Notes:
6 // this is used to define mixins (think of them as functions)
7 // and variables. the mixins are the ".foo () {}" things, vars are
8 // like "@bar".
9 //
10 // (BTW, this will make it a LOT easier to maintain.)
11 // 
12 // Dev. Note: the // style comments don't show up at all when
13 // you "compile" the css (with `lessc`), but css (/**/) comments
14 // do. i use them to our advantage :).
15
16 // import our reset styles first
17 @import "../css/reset";
18
19 //* backgrounds */
20 @lt_bg_colour: lighten(@bg_colour, 10%);
21 @dk_bg_colour: #1d1f1d;
22 @bg_colour: #2e2f2e;
23 @bg_alt_colour: #2e302e;
24 @med_bg_colour: #4e4f4e;
25 @menu_bg_colour: #555753;
26
27 //* font colour, aka color: */
28 @lt_main_colour: lighten(@main_colour, 10%);
29 @main_colour: #eeeecc;
30 @dk_main_colour: darken(@main_colour, 20%);
31 @main_alt_colour: #eeeeee;
32 // darken(@main_alt_colour, 13%) > #cdcdcd
33 // darken(@main_alt_colour, 13.5%) > #cccccc
34 // darken(@main_alt_colour, 33%) > #9a9a9a
35 // darken(@main_alt_colour, 24%) > #b1b1b1
36 // darken(@main_alt_colour, 27%) > #a9a9a9
37 // darken(@main_alt_colour, 33.5%) > #999999
38 // darken(@main_alt_colour, 40%) > #888888
39 // darken(@main_alt_colour, 46.8%) > #777777
40 // darken(@main_alt_colour, 53.5%) > #666666
41 // darken(@main_alt_colour, 60%) > #555555
42 // darken(@main_alt_colour, 66.5%) > #444444
43 // darken(@main_alt_colour, 73.5%) > #333333
44 // darken(@main_alt_colour, 80%) > #222222
45 // darken(@main_alt_colour, 86.5%) > #111111
46 @disabled_colour: #ddddbb;
47 @shiny_colour: #2e3436;
48 @red_orange: #ff2000;
49 @orange: #f8911b;
50 @lt_orange: #fcaf3e;
51 @shadow_colour: darken(@main_alt_colour, 86.5%);
52 @lt_shadow_colour: #888888;
53 @friendica_blue: #3465a4;
54 @border2: #babdb6;
55 @group_show: #9ade00;
56 @group_hide: #ff4141;
57 @notice: #3320bc;
58 @info: #1353b1;
59 @alert: #ff0000;
60
61 //* links */
62 @link_colour: #88a9d2;
63 @dk_link_colour: darken(@link_colour, 10%);
64 @lt_link_colour: lighten(@link_colour, 10%);
65 //@hover_colour: #729fcf;
66 @hover_colour: @dk_link_colour;
67
68 // other colours
69 @med_border_colour: #c8bebe;
70
71 //* box shadows */
72 @menu_shadow: 5px 0 10px 0 @shadow_colour;
73 @main_shadow: 3px 3px 3px 10px 0 @shadow_colour;
74
75 // default here was @main_shadow
76 .box_shadow(@h: 5px, @v: 5px, @blur: 5px, @spread: 0px, @colour: @shadow_colour) {
77         -moz-box-shadow: @h @v @blur @spread @colour;
78         -o-box-shadow: @h @v @blur @spread @colour;
79         -webkit-box-shadow: @h @v @blur @spread @colour;
80         -ms-box-shadow: @h @v @blur @spread @colour;
81         box-shadow: @h @v @blur @spread @colour;
82 }
83 //* http://css-tricks.com/snippets/css/css-box-shadow/
84 //* box-shadow:
85 //* 1. The horizontal offset of the shadow, positive means
86 //* the shadow will be on the right of the box, a negative
87 //* offset will put the shadow on the left of the box.
88 //* 2. The vertical offset of the shadow, a negative one
89 //* means the box-shadow will be above the box, a
90 //* positive one means the shadow will be below the box.
91 //* 3. The blur radius (optional), if set to 0 the shadow
92 //* will be sharp, the higher the number, the more blurred
93 //* it will be.
94 //* 4. The spread radius (optional), positive values increase
95 //* the size of the shadow, negative values decrease the size.
96 //* Default is 0 (the shadow is same size as blur).
97 //* 5. Colo[u]r
98 //*/
99
100 //* text-shadow */
101 .text_shadow (@h: 1px, @v: 1px, @c: @shadow_colour) {
102         -moz-text-shadow: @h @v @c;
103         -o-text-shadow: @h @v @c;
104         -webkit-text-shadow: @h @v @c;
105         -ms-text-shadow: @h @v @c;
106         text-shadow: @h @v @c;
107 }
108 //* transitions */
109 .transition (@type: all, @dur: 0.75s, @effect: ease-in-out) {
110     -webkit-transition: @arguments;
111     -moz-transition: @arguments;
112     -o-transition: @arguments;
113     -ms-transition: @arguments;
114     transition: @arguments;
115 }
116
117 //* borders */
118 .borders (@size: 1px, @style: solid, @colour: @main_colour) {
119         border: @size @style @colour;
120 }
121 .med_borders (@sz: 2px, @st: solid, @c: @med_border_colour) {
122         border: @sz @st @c;
123 }
124 //* rounded box corners */
125 .rounded_corners (@r: 5px) {
126         -o-border-radius: @r;
127         -webkit-border-radius: @r;
128         -moz-border-radius: @r;
129         -ms-border-radius: @r;
130         border-radius: @r;
131 }
132 .text_overflow (@t: ellipsis) {
133         -moz-text-overflow: @t;
134         -ms-text-verflow: @t;
135         -o-text-overflow: @t;
136         -webkit-text-overflow: @t;
137         text-overflow: @t;
138 }
139 .lin_gradient(@x1: left, @x2: right, @y1: top, @y2: bottom, @c1: @bg_colour, @c2: @dk_bg_colour) {
140         // w3c
141         background: linear-gradient(@x1 @y2, @c1, @c2);
142         // webkit
143         // -webkit-gradient(<type>, <point> [, <radius>]?, <point> [, <radius>]? [, <stop>]*)
144         background: -webkit-gradient(linear, @x1 @y1, @x2 @y2, from(@c1), to(@c2));
145         // mozilla
146         // -moz-linear-gradient([<point> || <angle>,]? <stop>, <stop> [, <stop>])
147         background: -moz-linear-gradient(@x1 @y2, @c1, @c2);
148         // opera
149         //background: -o-linear-gradient([<point> || <angle>,]? <stop>, <stop> [, <stop>]);
150         background: -o-linear-gradient(@x1, @c1, @c2);
151 }
152 //* pre wrap */
153 .wrap () {
154         white-space: pre-wrap;
155         white-space: pre;
156         word-wrap: none;
157 }
158 //* font size sizing */
159 .default_font () {
160         font-size: 14pt;
161         line-height: 1.1em;
162         font-family: sans-serif;
163 }
164 .font_size_adjust () {
165         -webkit-text-size-adjust: 100%;
166         -ms-text-size-adjust: 100%;
167         -o-text-size-adjust: 100%;
168         font-size-adjust: 100%;
169 }
170
171 //* reset ul, ol */
172 .list_reset () {
173         margin: 0px;
174         padding: 0px;
175         list-style: none;
176         list-style-position: inside;
177 }
178
179 //* box size: width, height */
180 .box (@w: 20px, @h: 20px) {
181         width: @w;
182         height: @h;
183 }
184