source: trunk/css/utilities.inc.css @ 666

Last change on this file since 666 was 666, checked in by anonymous, 5 years ago

Polish css

File size: 3.4 KB
Line 
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
12input.sc-micro, textarea.sc-micro, select.sc-micro,
13input.sc-tiny, textarea.sc-tiny, select.sc-tiny,
14input.sc-small, textarea.sc-small, select.sc-small,
15input.sc-medium, textarea.sc-medium, select.sc-medium,
16input.sc-large, textarea.sc-large, select.sc-large,
17input.sc-full, textarea.sc-full, select.sc-full {
18    margin: 0 0.5rem 0 0;
19    box-sizing: border-box;
20}
21
22/*
23The following widths are calculated to include a small right-margin and be equally divisible so the right edges align.
24The formula is `width = (maxwidth - (rightmargin * multiple)) / multiple`
25where width is the sought value, maxwidth is the width of a sc-large, and multiple is the number
26of times an element fits within maxwidth (i.e. sc-micro has a multiple of 16).
27The values are dependent on the margin, padding, and border set above.
28(44-(0.5*1))/1 = 43.5
29(44-(0.5*2))/2 = 21.5
30(44-(0.5*4))/4 = 10.5
31(44-(0.5*8))/8 = 5
32(44-(0.5*8))/16 = 2.5
33Note: avoid adding whitespace between input elements, or add `display: flex;` to the inputs' parent.
34*/
35input.sc-micro, textarea.sc-micro, select.sc-micro, label.sc-micro      { width: 2.5rem; }
36input.sc-tiny, textarea.sc-tiny, select.sc-tiny, label.sc-tiny          { width: 5rem; }
37input.sc-small, textarea.sc-small, select.sc-small, label.sc-small      { width: 10.5rem; }
38input.sc-medium, textarea.sc-medium, select.sc-medium, label.sc-medium  { width: 21.5rem; }
39input.sc-large, textarea.sc-large, select.sc-large, label.sc-large      { width: 43.5rem; }
40input.sc-full, textarea.sc-full, select.sc-full, label.sc-full          { width: 100%; }
41
42textarea.sc-twolines, select.sc-twolines              { height: 3.5rem; }
43textarea.sc-short, select.sc-short                    { height: 8rem; }
44textarea.sc-tall, select.sc-tall                      { height: 25rem; }
45textarea.sc-fullscreen, select.sc-fullscreen          { height: 40rem; }
46
47/*_____________________ UTILITIES ____________________*/
48.sc-center { text-align: center; }
49.sc-clearboth { clear: both; }
50.sc-help { color: #999; font-weight: normal; }
51.sc-hidden { display: none; }
52.sc-monospaced { font-family: monospace; }
53.sc-padleft { padding-left: 10px; }
54.sc-padright { padding-right: 10px; }
55.sc-marginleft { margin-left: 10px; }
56.sc-marginright { margin-right: 10px; }
57.sc-right { text-align: right; }
58.sc-pull-left { float: left; display: block; }
59.sc-pull-right { float: right; display: block; }
60.sc-normal {
61    font: inherit;
62    vertical-align: baseline;
63    font-weight: normal;
64    white-space: normal;
65    text-transform: none;
66}
67.sc-nowrap { white-space: nowrap; }
68.sc-dim {
69    filter:alpha(opacity=33);
70    -moz-opacity:.33;
71    opacity:.33;
72}
73.sc-note:hover { cursor: help; }
74.sc-ellipsis {
75    overflow: hidden;
76    white-space: nowrap;
77    text-overflow: ellipsis;
78}
79
80/* .sc-pkg class wraps enclosing block element around inner floated elements */
81.sc-pkg:after { content: " "; display: block; visibility: hidden; clear: both; height: 0.1px; font-size: 0.1em; line-height: 0.0; }
82* html .sc-pkg { display: block; }
83/* no ie mac \*/
84* html .sc-pkg { height: 1%; }
85.sc-pkg { display: block; }
86/* */
Note: See TracBrowser for help on using the repository browser.