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