[1] | 1 | /** |
---|
[741] | 2 | * utilities.inc.css |
---|
| 3 | * Global utility styles often in Strangecode applications. |
---|
| 4 | */ |
---|
[1] | 5 | |
---|
[741] | 6 | /* |
---|
| 7 | FORMS |
---|
| 8 | */ |
---|
[616] | 9 | input.sc-micro, textarea.sc-micro, select.sc-micro, |
---|
[121] | 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, |
---|
[168] | 13 | input.sc-large, textarea.sc-large, select.sc-large, |
---|
[557] | 14 | input.sc-full, textarea.sc-full, select.sc-full { |
---|
| 15 | margin: 0 0.5rem 0 0; |
---|
[616] | 16 | box-sizing: border-box; |
---|
[557] | 17 | } |
---|
[455] | 18 | /* |
---|
[616] | 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 = (maxwidth - (rightmargin * multiple)) / multiple` |
---|
[557] | 21 | where width is the sought value, maxwidth is the width of a sc-large, and multiple is the number |
---|
[616] | 22 | of times an element fits within maxwidth (i.e. sc-micro has a multiple of 16). |
---|
[455] | 23 | The values are dependent on the margin, padding, and border set above. |
---|
[616] | 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. |
---|
[455] | 30 | */ |
---|
[616] | 31 | input.sc-micro, textarea.sc-micro, select.sc-micro, label.sc-micro { width: 2.5rem; } |
---|
| 32 | input.sc-tiny, textarea.sc-tiny, select.sc-tiny, label.sc-tiny { width: 5rem; } |
---|
| 33 | input.sc-small, textarea.sc-small, select.sc-small, label.sc-small { width: 10.5rem; } |
---|
| 34 | input.sc-medium, textarea.sc-medium, select.sc-medium, label.sc-medium { width: 21.5rem; } |
---|
| 35 | input.sc-large, textarea.sc-large, select.sc-large, label.sc-large { width: 43.5rem; } |
---|
[160] | 36 | input.sc-full, textarea.sc-full, select.sc-full, label.sc-full { width: 100%; } |
---|
[666] | 37 | textarea.sc-twolines, select.sc-twolines { height: 3.5rem; } |
---|
[557] | 38 | textarea.sc-short, select.sc-short { height: 8rem; } |
---|
| 39 | textarea.sc-tall, select.sc-tall { height: 25rem; } |
---|
| 40 | textarea.sc-fullscreen, select.sc-fullscreen { height: 40rem; } |
---|
[741] | 41 | /* |
---|
| 42 | UTILITIES |
---|
| 43 | */ |
---|
[160] | 44 | .sc-center { text-align: center; } |
---|
[121] | 45 | .sc-clearboth { clear: both; } |
---|
| 46 | .sc-help { color: #999; font-weight: normal; } |
---|
[485] | 47 | .sc-hidden { display: none; } |
---|
[267] | 48 | .sc-monospaced { font-family: monospace; } |
---|
[259] | 49 | .sc-padleft { padding-left: 10px; } |
---|
| 50 | .sc-padright { padding-right: 10px; } |
---|
[485] | 51 | .sc-marginleft { margin-left: 10px; } |
---|
| 52 | .sc-marginright { margin-right: 10px; } |
---|
[160] | 53 | .sc-right { text-align: right; } |
---|
[643] | 54 | .sc-pull-left { float: left; display: block; } |
---|
| 55 | .sc-pull-right { float: right; display: block; } |
---|
[639] | 56 | .sc-normal { |
---|
| 57 | font: inherit; |
---|
| 58 | vertical-align: baseline; |
---|
| 59 | font-weight: normal; |
---|
| 60 | white-space: normal; |
---|
[645] | 61 | text-transform: none; |
---|
[639] | 62 | } |
---|
[269] | 63 | .sc-nowrap { white-space: nowrap; } |
---|
[270] | 64 | .sc-dim { |
---|
[485] | 65 | filter:alpha(opacity=33); |
---|
| 66 | -moz-opacity:.33; |
---|
| 67 | opacity:.33; |
---|
[270] | 68 | } |
---|
[406] | 69 | .sc-note:hover { cursor: help; } |
---|
[454] | 70 | .sc-ellipsis { |
---|
| 71 | overflow: hidden; |
---|
| 72 | white-space: nowrap; |
---|
| 73 | text-overflow: ellipsis; |
---|
| 74 | } |
---|
[121] | 75 | /* .sc-pkg class wraps enclosing block element around inner floated elements */ |
---|
| 76 | .sc-pkg:after { content: " "; display: block; visibility: hidden; clear: both; height: 0.1px; font-size: 0.1em; line-height: 0.0; } |
---|
| 77 | * html .sc-pkg { display: block; } |
---|
[51] | 78 | /* no ie mac \*/ |
---|
[121] | 79 | * html .sc-pkg { height: 1%; } |
---|
| 80 | .sc-pkg { display: block; } |
---|
[51] | 81 | /* */ |
---|