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

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

Polish css

File size: 3.4 KB
RevLine 
[1]1/**
[455]2 * utilities.inc.css
[1]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 ____________________*/
[25]11
[616]12input.sc-micro, textarea.sc-micro, select.sc-micro,
[121]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,
[168]16input.sc-large, textarea.sc-large, select.sc-large,
[557]17input.sc-full, textarea.sc-full, select.sc-full {
18    margin: 0 0.5rem 0 0;
[616]19    box-sizing: border-box;
[557]20}
[25]21
[455]22/*
[616]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`
[557]25where width is the sought value, maxwidth is the width of a sc-large, and multiple is the number
[616]26of times an element fits within maxwidth (i.e. sc-micro has a multiple of 16).
[455]27The values are dependent on the margin, padding, and border set above.
[616]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.
[455]34*/
[616]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; }
[160]40input.sc-full, textarea.sc-full, select.sc-full, label.sc-full          { width: 100%; }
[1]41
[666]42textarea.sc-twolines, select.sc-twolines              { height: 3.5rem; }
[557]43textarea.sc-short, select.sc-short                    { height: 8rem; }
44textarea.sc-tall, select.sc-tall                      { height: 25rem; }
45textarea.sc-fullscreen, select.sc-fullscreen          { height: 40rem; }
[1]46
47/*_____________________ UTILITIES ____________________*/
[160]48.sc-center { text-align: center; }
[121]49.sc-clearboth { clear: both; }
50.sc-help { color: #999; font-weight: normal; }
[485]51.sc-hidden { display: none; }
[267]52.sc-monospaced { font-family: monospace; }
[259]53.sc-padleft { padding-left: 10px; }
54.sc-padright { padding-right: 10px; }
[485]55.sc-marginleft { margin-left: 10px; }
56.sc-marginright { margin-right: 10px; }
[160]57.sc-right { text-align: right; }
[643]58.sc-pull-left { float: left; display: block; }
59.sc-pull-right { float: right; display: block; }
[639]60.sc-normal {
61    font: inherit;
62    vertical-align: baseline;
63    font-weight: normal;
64    white-space: normal;
[645]65    text-transform: none;
[639]66}
[269]67.sc-nowrap { white-space: nowrap; }
[270]68.sc-dim {
[485]69    filter:alpha(opacity=33);
70    -moz-opacity:.33;
71    opacity:.33;
[270]72}
[406]73.sc-note:hover { cursor: help; }
[454]74.sc-ellipsis {
75    overflow: hidden;
76    white-space: nowrap;
77    text-overflow: ellipsis;
78}
[1]79
[121]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; }
[51]83/* no ie mac \*/
[121]84* html .sc-pkg { height: 1%; }
85.sc-pkg { display: block; }
[51]86/* */
Note: See TracBrowser for help on using the repository browser.