1 | /** |
---|
2 | * utilities.inc.css |
---|
3 | * Common styles used in Strangecode applications. |
---|
4 | */ |
---|
5 | |
---|
6 | /* |
---|
7 | FORMS |
---|
8 | */ |
---|
9 | input.sc-micro, textarea.sc-micro, select.sc-micro, |
---|
10 | input.sc-tiny, textarea.sc-tiny, select.sc-tiny, |
---|
11 | input.sc-small, textarea.sc-small, select.sc-small, |
---|
12 | input.sc-medium, textarea.sc-medium, select.sc-medium, |
---|
13 | input.sc-large, textarea.sc-large, select.sc-large, |
---|
14 | input.sc-full, textarea.sc-full, select.sc-full { |
---|
15 | margin: 0 0.5rem 0 0; |
---|
16 | box-sizing: border-box; |
---|
17 | } |
---|
18 | /* |
---|
19 | The following widths are calculated to include a small right-margin and be equally divisible so the right edges align. |
---|
20 | The formula is `width = (width - (rightmargin * multiple)) / multiple` |
---|
21 | where width is the sought value, width is the width of a sc-large, and multiple is the number |
---|
22 | of times an element fits within width (i.e. sc-micro has a multiple of 16). |
---|
23 | The values are dependent on the margin, padding, and border set above. |
---|
24 | (44-(0.5*1))/1 = 43.5 |
---|
25 | (44-(0.5*2))/2 = 21.5 |
---|
26 | (44-(0.5*4))/4 = 10.5 |
---|
27 | (44-(0.5*8))/8 = 5 |
---|
28 | (44-(0.5*8))/16 = 2.5 |
---|
29 | Note: avoid adding whitespace between input elements, or add `display: flex;` to the inputs' parent. |
---|
30 | 20240112: Until today, `max-width` and `width` were incorrectly reversed. |
---|
31 | */ |
---|
32 | input.sc-micro, textarea.sc-micro, select.sc-micro, label.sc-micro { max-width: 2.5rem; width: 100%; } |
---|
33 | input.sc-tiny, textarea.sc-tiny, select.sc-tiny, label.sc-tiny { max-width: 5rem; width: 100%; } |
---|
34 | input.sc-small, textarea.sc-small, select.sc-small, label.sc-small { max-width: 10.5rem; width: 100%; } |
---|
35 | input.sc-medium, textarea.sc-medium, select.sc-medium, label.sc-medium { max-width: 21.5rem; width: 100%; } |
---|
36 | input.sc-large, textarea.sc-large, select.sc-large, label.sc-large { max-width: 43.5rem; width: 100%; } |
---|
37 | input.sc-full, textarea.sc-full, select.sc-full, label.sc-full { max-width: 100%; width: 100%; } |
---|
38 | textarea.sc-twolines, select.sc-twolines { height: 3.5rem; } |
---|
39 | textarea.sc-short, select.sc-short { height: 8rem; } |
---|
40 | textarea.sc-tall, select.sc-tall { height: 25rem; } |
---|
41 | textarea.sc-fullscreen, select.sc-fullscreen { height: 40rem; } |
---|
42 | /* |
---|
43 | UTILITIES |
---|
44 | */ |
---|
45 | .sc-center { text-align: center; } |
---|
46 | .sc-clearboth { clear: both; } |
---|
47 | .sc-help { color: #999; font-weight: normal; } |
---|
48 | .sc-hidden { display: none; } |
---|
49 | .sc-monospaced { font-family: monospace; } |
---|
50 | .sc-padleft { padding-left: 10px; } |
---|
51 | .sc-padright { padding-right: 10px; } |
---|
52 | .sc-marginleft { margin-left: 10px; } |
---|
53 | .sc-marginright { margin-right: 10px; } |
---|
54 | .sc-right { text-align: right; } |
---|
55 | .sc-pull-left { float: left; display: block; } |
---|
56 | .sc-pull-right { float: right; display: block; } |
---|
57 | .sc-normal { |
---|
58 | font: inherit; |
---|
59 | vertical-align: baseline; |
---|
60 | font-weight: normal; |
---|
61 | white-space: normal; |
---|
62 | text-transform: none; |
---|
63 | } |
---|
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 | /* .sc-pkg class wraps enclosing block element around inner floated elements */ |
---|
77 | .sc-pkg:after { content: " "; display: block; visibility: hidden; clear: both; height: 0.1px; font-size: 0.1em; line-height: 0.0; } |
---|
78 | * html .sc-pkg { display: block; } |
---|
79 | /* no ie mac \*/ |
---|
80 | * html .sc-pkg { height: 1%; } |
---|
81 | .sc-pkg { display: block; } |
---|
82 | /* */ |
---|