]> git.mxchange.org Git - friendica.git/blob - view/theme/dispy/light/_base.less
Merge https://github.com/friendica/friendica into pull
[friendica.git] / view / theme / dispy / light / _base.less
1 // _base.less
2 //
3 // the base file for dispy's light "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 @dk_bg_colour: #2e3436;
21 @bg_colour: #eeeeec;
22 @bg_alt_colour: #2e302e;
23 @med_bg_colour: #4e4f4e;
24 @menu_bg_colour: #555753;
25
26 //* font colour, aka color: */
27 @lt_main_colour: lighten(@bg_colour, 10%);
28 @main_colour: #111;
29 @dk_main_colour: darken(@bg_colour, 10%);
30 @main_alt_colour: #999999;
31 // darken(@main_alt_colour, 6.5%) > #888888
32 // //#9eabb0
33 // darken(@main_alt_colour, 10%) > #777777
34 // darken(@main_alt_colour, 20%) > #666666
35 // darken(@main_alt_colour, 26.8%) > #555555
36 // darken(@main_alt_colour, 33.5%) > #444444
37 // darken(@main_alt_colour, 40%) > #333333
38 //
39 // lighten(@main_alt_colour, 26.5%) > #dddddd
40 // lighten(@main_alt_colour, 20%) > #cccccc
41 // lighten(@main_alt_colour, 13.5%) > #bbbbbb
42 // lighten(@main_alt_colour, 6.5%) > #aaaaaa
43 // lighten(@main_alt_colour, 30%)
44 @disabled_colour: #dddddd;
45 @shiny_colour: #f2f2c3;
46 @red_orange: #ff2000;
47 @orange: #f8911b;
48 @lt_orange: #fcaf3e;
49 @shadow_colour: @main_colour;
50 @lt_shadow_colour: #888888;
51 @friendica_blue: #3465a4;
52 @border2: #babdb6;
53 @group_show: #9ade00;
54 @group_hide: #ff4141;
55 @notice: #511919;
56 @info: #364e59;
57 @alert: #ff0000;
58
59 //* links */
60 // yes our link colour is "friendica blue" ;)
61 @link_colour: @friendica_blue;
62 @dk_link_colour: darken(@link_colour, 10%);
63 @lt_link_colour: lighten(@link_colour, 10%);
64 //@hover_colour: #729fcf;
65 @hover_colour: @dk_link_colour;
66
67 // other colours
68 @med_border_colour: #babdd6;
69
70 //* box shadows */
71 @menu_shadow: 5px 0 10px 0 @shadow_colour;
72 @main_shadow: 3px 3px 3px 10px 0 @shadow_colour;
73
74 // default here was @main_shadow
75 .box_shadow(@h: 5px, @v: 5px, @blur: 5px, @spread: 0px, @colour: @shadow_colour) {
76         -moz-box-shadow: @h @v @blur @spread @colour;
77         -o-box-shadow: @h @v @blur @spread @colour;
78         -webkit-box-shadow: @h @v @blur @spread @colour;
79         -ms-box-shadow: @h @v @blur @spread @colour;
80         box-shadow: @h @v @blur @spread @colour;
81 }
82 //* http://css-tricks.com/snippets/css/css-box-shadow/
83 //* box-shadow:
84 //* 1. The horizontal offset of the shadow, positive means
85 //* the shadow will be on the right of the box, a negative
86 //* offset will put the shadow on the left of the box.
87 //* 2. The vertical offset of the shadow, a negative one
88 //* means the box-shadow will be above the box, a
89 //* positive one means the shadow will be below the box.
90 //* 3. The blur radius (optional), if set to 0 the shadow
91 //* will be sharp, the higher the number, the more blurred
92 //* it will be.
93 //* 4. The spread radius (optional), positive values increase
94 //* the size of the shadow, negative values decrease the size.
95 //* Default is 0 (the shadow is same size as blur).
96 //* 5. Colo[u]r
97 //*/
98
99 //* text-shadow */
100 .text_shadow (@h: 1px, @v: 1px, @c: @shadow_colour) {
101         -moz-text-shadow: @h @v @c;
102         -o-text-shadow: @h @v @c;
103         -webkit-text-shadow: @h @v @c;
104         -ms-text-shadow: @h @v @c;
105         text-shadow: @h @v @c;
106 }
107 //* transitions */
108 .transition (@type: all, @dur: 0.75s, @effect: ease-in-out) {
109     -webkit-transition: @arguments;
110     -moz-transition: @arguments;
111     -o-transition: @arguments;
112     -ms-transition: @arguments;
113     transition: @arguments;
114 }
115
116 //* borders */
117 .borders (@size: 1px, @style: solid, @colour: @main_colour) {
118         border: @size @style @colour;
119 }
120 .med_borders (@sz: 2px, @st: solid, @c: @med_border_colour) {
121         border: @sz @st @c;
122 }
123 //* rounded box corners */
124 .rounded_corners (@r: 5px) {
125         -o-border-radius: @r;
126         -webkit-border-radius: @r;
127         -moz-border-radius: @r;
128         -ms-border-radius: @r;
129         border-radius: @r;
130 }
131 .text_overflow (@t: ellipsis) {
132         -moz-text-overflow: @t;
133         -ms-text-verflow: @t;
134         -o-text-overflow: @t;
135         -webkit-text-overflow: @t;
136         text-overflow: @t;
137 }
138 .lin_gradient(@x1: left, @x2: right, @y1: top, @y2: bottom, @c1: @bg_colour, @c2: @dk_bg_colour) {
139         // w3c
140         background: linear-gradient(@x1 @y2, @c1, @c2);
141         // webkit
142         // -webkit-gradient(<type>, <point> [, <radius>]?, <point> [, <radius>]? [, <stop>]*)
143         background: -webkit-gradient(linear, @x1 @y1, @x2 @y2, from(@c1), to(@c2));
144         // mozilla
145         // -moz-linear-gradient([<point> || <angle>,]? <stop>, <stop> [, <stop>])
146         background: -moz-linear-gradient(@x1 @y2, @c1, @c2);
147         // opera
148         //background: -o-linear-gradient([<point> || <angle>,]? <stop>, <stop> [, <stop>]);
149         background: -o-linear-gradient(@x1, @c1, @c2);
150 }
151 //* pre wrap */
152 .wrap () {
153         white-space: pre-wrap;
154         white-space: pre;
155         word-wrap: none;
156 }
157 //* font size sizing */
158 .default_font () {
159         font-size: 14pt;
160         line-height: 1.1em;
161         font-family: sans-serif;
162 }
163 .font_size_adjust () {
164         -webkit-text-size-adjust: 100%;
165         -ms-text-size-adjust: 100%;
166         -o-text-size-adjust: 100%;
167         font-size-adjust: 100%;
168 }
169
170 //* reset ul, ol */
171 .list_reset () {
172         margin: 0px;
173         padding: 0px;
174         list-style: none;
175         list-style-position: inside;
176 }
177
178 //* box size: width, height */
179 .box (@w: 20px, @h: 20px) {
180         width: @w;
181         height: @h;
182 }
183