1 | /** |
---|
2 | * utilities.inc.css |
---|
3 | * |
---|
4 | * CSS used often in Strangecode applications. Do not arbitrarily |
---|
5 | * edit this code! This file is used between many sites and modifying it may result |
---|
6 | * in something breaking. Instead, overwrite these values in a specific site by |
---|
7 | * adding new definitions to a screen.css file. |
---|
8 | */ |
---|
9 | |
---|
10 | /*_____________________ FORMS ____________________*/ |
---|
11 | |
---|
12 | input.sc-micro, textarea.sc-micro, select.sc-micro, |
---|
13 | input.sc-tiny, textarea.sc-tiny, select.sc-tiny, |
---|
14 | input.sc-small, textarea.sc-small, select.sc-small, |
---|
15 | input.sc-medium, textarea.sc-medium, select.sc-medium, |
---|
16 | input.sc-large, textarea.sc-large, select.sc-large, |
---|
17 | input.sc-full, textarea.sc-full, select.sc-full { |
---|
18 | margin: 0 0.5rem 0 0; |
---|
19 | padding: 2px 0.25rem; |
---|
20 | border-width: 1px; |
---|
21 | box-sizing: border-box; |
---|
22 | } |
---|
23 | |
---|
24 | /* |
---|
25 | The following widths are calculated to include a small right-margin and be equally divisible so the right edges align. |
---|
26 | The formula is `width = (maxwidth - (rightmargin * multiple)) / multiple` |
---|
27 | where width is the sought value, maxwidth is the width of a sc-large, and multiple is the number |
---|
28 | of times an element fits within maxwidth (i.e. sc-micro has a multiple of 16). |
---|
29 | The values are dependent on the margin, padding, and border set above. |
---|
30 | (44-(0.5*1))/1 = 43.5 |
---|
31 | (44-(0.5*2))/2 = 21.5 |
---|
32 | (44-(0.5*4))/4 = 10.5 |
---|
33 | (44-(0.5*8))/8 = 5 |
---|
34 | (44-(0.5*8))/16 = 2.5 |
---|
35 | Note: avoid adding whitespace between input elements, or add `display: flex;` to the inputs' parent. |
---|
36 | */ |
---|
37 | input.sc-micro, textarea.sc-micro, select.sc-micro, label.sc-micro { width: 2.5rem; } |
---|
38 | input.sc-tiny, textarea.sc-tiny, select.sc-tiny, label.sc-tiny { width: 5rem; } |
---|
39 | input.sc-small, textarea.sc-small, select.sc-small, label.sc-small { width: 10.5rem; } |
---|
40 | input.sc-medium, textarea.sc-medium, select.sc-medium, label.sc-medium { width: 21.5rem; } |
---|
41 | input.sc-large, textarea.sc-large, select.sc-large, label.sc-large { width: 43.5rem; } |
---|
42 | input.sc-full, textarea.sc-full, select.sc-full, label.sc-full { width: 100%; } |
---|
43 | |
---|
44 | select.sc-small { width: 10rem; } |
---|
45 | select.sc-medium { width: 20.5rem; } |
---|
46 | |
---|
47 | textarea.sc-twolines, select.sc-twolines { height: 3rem; } |
---|
48 | textarea.sc-short, select.sc-short { height: 8rem; } |
---|
49 | textarea.sc-tall, select.sc-tall { height: 25rem; } |
---|
50 | textarea.sc-fullscreen, select.sc-fullscreen { height: 40rem; } |
---|
51 | |
---|
52 | /*_____________________ UTILITIES ____________________*/ |
---|
53 | .sc-center { text-align: center; } |
---|
54 | .sc-clearboth { clear: both; } |
---|
55 | .sc-help { color: #999; font-weight: normal; } |
---|
56 | .sc-hidden { display: none; } |
---|
57 | .sc-monospaced { font-family: monospace; } |
---|
58 | .sc-padleft { padding-left: 10px; } |
---|
59 | .sc-padright { padding-right: 10px; } |
---|
60 | .sc-marginleft { margin-left: 10px; } |
---|
61 | .sc-marginright { margin-right: 10px; } |
---|
62 | .sc-right { text-align: right; } |
---|
63 | .sc-normal { font-weight: normal; } |
---|
64 | .sc-nowrap { white-space: nowrap; } |
---|
65 | .sc-dim { |
---|
66 | filter:alpha(opacity=33); |
---|
67 | -moz-opacity:.33; |
---|
68 | opacity:.33; |
---|
69 | } |
---|
70 | .sc-note:hover { cursor: help; } |
---|
71 | .sc-ellipsis { |
---|
72 | overflow: hidden; |
---|
73 | white-space: nowrap; |
---|
74 | text-overflow: ellipsis; |
---|
75 | } |
---|
76 | |
---|
77 | /* .sc-pkg class wraps enclosing block element around inner floated elements */ |
---|
78 | .sc-pkg:after { content: " "; display: block; visibility: hidden; clear: both; height: 0.1px; font-size: 0.1em; line-height: 0.0; } |
---|
79 | * html .sc-pkg { display: block; } |
---|
80 | /* no ie mac \*/ |
---|
81 | * html .sc-pkg { height: 1%; } |
---|
82 | .sc-pkg { display: block; } |
---|
83 | /* */ |
---|