source: trunk/css/utilities.inc.css

Last change on this file was 802, checked in by anonymous, 4 months ago

Fix reversed use of width and max-width

File size: 3.2 KB
Line 
1/**
2* utilities.inc.css
3* Common styles used in Strangecode applications.
4*/
5
6/*
7FORMS
8*/
9input.sc-micro, textarea.sc-micro, select.sc-micro,
10input.sc-tiny, textarea.sc-tiny, select.sc-tiny,
11input.sc-small, textarea.sc-small, select.sc-small,
12input.sc-medium, textarea.sc-medium, select.sc-medium,
13input.sc-large, textarea.sc-large, select.sc-large,
14input.sc-full, textarea.sc-full, select.sc-full {
15    margin: 0 0.5rem 0 0;
16    box-sizing: border-box;
17}
18/*
19The following widths are calculated to include a small right-margin and be equally divisible so the right edges align.
20The formula is `width = (width - (rightmargin * multiple)) / multiple`
21where width is the sought value, width is the width of a sc-large, and multiple is the number
22of times an element fits within width (i.e. sc-micro has a multiple of 16).
23The 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
29Note: avoid adding whitespace between input elements, or add `display: flex;` to the inputs' parent.
3020240112: Until today, `max-width` and `width` were incorrectly reversed.
31*/
32input.sc-micro, textarea.sc-micro, select.sc-micro, label.sc-micro      { max-width: 2.5rem; width: 100%; }
33input.sc-tiny, textarea.sc-tiny, select.sc-tiny, label.sc-tiny          { max-width: 5rem; width: 100%; }
34input.sc-small, textarea.sc-small, select.sc-small, label.sc-small      { max-width: 10.5rem; width: 100%; }
35input.sc-medium, textarea.sc-medium, select.sc-medium, label.sc-medium  { max-width: 21.5rem; width: 100%; }
36input.sc-large, textarea.sc-large, select.sc-large, label.sc-large      { max-width: 43.5rem; width: 100%; }
37input.sc-full, textarea.sc-full, select.sc-full, label.sc-full          { max-width: 100%; width: 100%; }
38textarea.sc-twolines, select.sc-twolines              { height: 3.5rem; }
39textarea.sc-short, select.sc-short                    { height: 8rem; }
40textarea.sc-tall, select.sc-tall                      { height: 25rem; }
41textarea.sc-fullscreen, select.sc-fullscreen          { height: 40rem; }
42/*
43UTILITIES
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/* */
Note: See TracBrowser for help on using the repository browser.