X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=style.css;h=24c936803befb6b775c50c1c6b6af30ea3213f2b;hp=33e7cd03c18840c700871e337d23973e6ecfb826;hb=6e0c5a503b2ac95dd6cc7076a26edd89a45fee5e;hpb=5ab459e666f2526f671fe222cd1646a4e6798b27 diff --git a/style.css b/style.css index 33e7cd0..24c9368 100644 --- a/style.css +++ b/style.css @@ -1,126 +1,446 @@ * { - font-family: sans-serif; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; + position: relative; box-sizing: border-box; - padding: 0; margin: 0; + max-width: 100%; + font-family: sans-serif; + font-weight: normal; font-size: initial; - line-height: 1.25em; - z-index: 0; + font-style: normal; + text-decoration: none; + line-height: 1.5em; + color: inherit; background: transparent; + padding: 0; margin: 0; + border: none; } -input, textarea, select, select * { - font-size: .875em; - padding: .125em .125em; +body { + color: #000; background-color: #FFF; } -input, select { - height: 1.5em; - vertical-align: bottom; + +/* ======= GENERIC HTML STYLES =======*/ + +p { margin-bottom: 1em; } + +a { + text-decoration: underline; + font-style: italic; + color: #068; } -button { padding: 0 .5em; } -body { - background: #EEE; - margin: 0; - padding: 0; - padding-top: 2.5em; - position: absolute; - min-height: 100%; - width: 100%; - padding-bottom: 2em; +i, em { font-style: italic; } +b, strong { font-weight: bolder; } +ul, ol { margin-left: 1.125em; } +table th { font-weight: bold; } + +h1, h2, h3 { + font-weight: bold; + margin-top: 1em; + margin-bottom: .5em; +} + +h1:first-child, h2:first-child, h3:first-child, +p + h1, p + h2, p + h3 { + margin-top: 0; +} + +h4, h5, h6, form legend { + font-weight: bolder; + margin-bottom: .25em; } -.NAVIGATION { - position: fixed; - top: 0; + +h1 { font-size: 1.5em; } +h2 { font-size: 1.125em; } + +select, input, button, textarea, +.control a { display: inline-block; - border-style: none solid solid solid; - border-width: 0 1px 1px 1px; - border-radius: 0 0 4px 4px; - margin: 0 2em; - padding: .5em 1ex; - background: #FFF; - z-index: 1; + background-color: #FFF; + border: 1pt solid; + padding: .25em .75em; + vertical-align: text-bottom; } -.NAVIGATION label, -.NAVIGATION a { - color: #008; - border: solid 1px #BBF; - margin: .5em .5ex .25em .5ex; - padding: .2em 3ex .2em 3ex; - background: #EFF; +.control a { + color: inherit; + font-style: normal; + text-decoration: none; } -.NAVIGATION label:hover, -.NAVIGATION a:hover { - border-width: 2px 1px; - background: #F3FFFF; + +select { padding: .375em 0; } + +input[type=radio], input[type=checkbox] { + vertical-align: baseline; } +input[type=number] { text-align: right; padding-right: 0; } -#CONFIGURE label[for="navigationconfig"] { display: none; } -#CONFIGURE:target label[for="navigationconfig"] { display: inline; } +button, input[type=button], +.control a { + box-shadow: .125em .125em .25em; + cursor: pointer; +} +input[type=radio], input[type=checkbox], +input[type=radio] + label, input[type=checkbox] + label { + cursor: pointer; +} -.NAVIGATION input#navigationconfig { display: none; } -.NAVIGATION input + form.config { - position: static; - display: none; +label { margin-right: .75em; } +input + label { + margin-left: .375em; } -.NAVIGATION .config a { display: block; } -.NAVIGATION .config a:hover { border-width: 1px 2px; } -.NAVIGATION input:checked + form.config { display: block; } -.NAVIGATION .config input[type=text], -.NAVIGATION .config button { - font-size: .875em; - line-height: 1.5em; +/* ====== COMMON ELEMENTS ======*/ + +body > ul.menu { + display: block; height: 1.75em; - padding: 0 .25em; - vertical-align: bottom; - border: 1px solid #000; + margin: 0; -padding: 0 .5em; + list-style: none; + color: #CCC; + background-color: #444; + box-shadow: inset 0 -.25em .25em #000; + overflow: hidden; + z-index: 3; +} + +body > .menu li { + display: inline-block; +} +body > .menu a { + color: inherit; + padding: .5em 3em; + box-shadow: inset 0 0 .5em #000; +} +body.cards > .menu a[href="/cards/"], +body.courses > .menu a[href="/courses/"] { + color: #000; background-color: #FFF; + box-shadow: none; } -.NAVIGATION .config input[type=text] { - margin: .25em 0 0 .375em; - border-right: none; - width: 70%; + +/* =========== FILTER AND SEARCH Headers ========= */ + +form.categories, +form.search, form.sort, form.filter, form.newcard, form.newcourses { + margin-top: 1em; padding: 0 1em; + z-index: 1; } -.NAVIGATION .config button { - min-width: 2.5em; - text-align: center; - max-width: 30%; +form.filter > h1 { display: none; } + +form.filter fieldset { margin-top: .5em; } +form.filter fieldset.item + fieldset.item legend { display: none; } +form.filter fieldset.item input[type=radio] { display: none; } +form.filter fieldset.item input[type=radio] + label { + display: table-cell; + padding: .5em 1em; + background-color: #EEE; + border-style: solid; + border-width: .5pt .25pt 0 .25pt; + white-space: normal; } -.NAVIGATION .config button[value=del] { - background: #FCC; +form.filter fieldset.item input[type=radio] + label:first-of-type { + border-left: 1pt solid; } +form.filter fieldset.item input[type=radio]:checked + label { + position: relative; + background-color: #FFF; + box-shadow: .125em -.125em .125em #888; + z-index: 1; +} +form.filter fieldset.item input[type=text], +form.filter fieldset.item fieldset.categories { + position: relative; + display: block; + width: 100%; + margin-top: -1pt; + padding: .25em .75em; + border: 1pt solid; + box-shadow: .125em .125em .25em #888; +} +form.filter fieldset.item fieldset.categories { display: none; } +form.filter fieldset.item input[value=CATEGORIES]:checked + label + input[type=text] { display: none; } +form.filter fieldset.item input[value=CATEGORIES]:checked + label + input[type=text] + fieldset.categories { display: block; } -#message { +form.filter fieldset.order legend { + float: left; margin-right: 1em; +} + +form.filter fieldset label, +form.filter fieldset a { white-space: pre;} +form.filter button[type=submit] { + margin-top: .5em; margin-bottom: .5em; +} + +body.courses form .order { display: inline-block; margin-right: 2em;} + + +/* ============ LIST ITEMS, Generic ============= */ + +body > form, +div.card, +div.course { + position: relative; + width: 98%; width: calc(100% - 2em); + margin-left: auto; margin-right: auto; + margin-bottom: 1em; + box-shadow: .125em .125em .25em; + z-index: 1; +} + +/* HACK: put anchor point 10em above card and highlight target element */ + div:target { box-shadow: none; z-index: 0; } + div:target:before { + content: ''; + display: block; + margin-top: -10em; + height: 10em; + visibility: hidden; + } + div:target:after { + content: ''; + display: block; + position: absolute; + left: 0; right: 0; + top: 10em; bottom: 0; + box-shadow: .125em .125em .25em; + animation: highlight 4s; + z-index: -1; + } + @keyframes highlight { from { background-color: #FF0; } to { background-color: transparent; } } +/**/ + +div .section, form .section { + display: block; + vertical-align: top; + padding: 0 1em; + overflow: hidden; + word-break: break-word; +} + +div .section :last-child, form .section :last-child { + margin-bottom: 1em; +} + +div .section h2, form .section h2, +div .section h3, form .section h3 { + border-bottom: 1pt solid #EEE; +} +div .control, form .control { + background-color: #EEE; + padding: .25em; + text-align: right; +} + +@media(min-width: 60em) { + div .section, form .section { + display: table-cell; + width: calc(100% / 10); + } + div .section :last-child { margin-bottom: 0; } + div .control, form .control { + background-color: transparent; + } + div .section:nth-of-type(2n) { + background-color: #EEE; + } +} +@media(min-width: 80em) { + div .control, form .control { + display: table-cell; + width: calc(100% / 10); + } + div .control .item, form .control .item { + display: block; + margin-bottom: .25em; + } +} + +div .section .item, form .section .item, +form .section.attendance > label { display: block; - position: fixed; - top: 0; width: 100%; - margin: 0; padding: 1em; - text-align: center; - font-weight: bold; - background-color: #FAA; - border: 1px solid #000; - border-style: none none solid none; -} - -.trailbtn { display: none; } -.trailbtn + .trailbox { display: none; } -.trailbtn:checked + .trailbox { display: inline-block; } -.trailbtn:checked + .trailbox + .trailbtn { display: block; } -.trailbtn:checked + .trailbox + .trailbtn:before { - display: block; content: '+'; - width: 3ex; text-align: center; - margin-top: .25em; padding: .25em 0; - background-color: #FFF; - border-width: 1px; border-style: solid; -} -.trailbtn:checked + .trailbox + .trailbtn:checked, -.trailbtn:checked { display: none; } - -#footer { width: 100%; - background-color: #FFF; - border-top: 1px solid #BBF; - margin: 0; padding: .5em 2em; - position: absolute; bottom: 0; +} + +div .section .item.NOTE { + white-space: pre-wrap; +} + +form .section .item { + margin-bottom: .25em; +} + +form .section button[value^=addfield] { + font-size: .75em; + margin-top: .5em; padding: 0 .375em; +} + +/* HACK: "responsive" Delete Button above each field */ + form input.delete { display: none; } + form input.delete + label { + float: right; + font-size: .75em; + line-height: 1; + max-width: 1.75em; height: 1.125em; overflow: hidden; + color: #FBB; background-color: #444; + margin: 0; padding: .125em .5em 0 .5em; + border-radius: 4pt 4pt 0 0; + transition: max-width .3s; + } + form input.delete + label:before { content: '\274c '; margin-right: .5em; } + form input.delete + label:hover { max-width: 10em; } + -form input.delete + label:hover:before { content: ''; } + -form input.delete + label:hover:after { content: ' \274c'; } + form input.delete:checked + label, + form input.delete:checked + label + * { + display: none; + } +/**/ + + +/* ====== right hand Control Buttons on list items ====== */ + +form .control { + position: relative; + padding-left: 11em; + padding-top: 1.5em; +} +form .control .item { + display: inline-block; + margin-bottom: .25em; + vertical-align: text-bottom; +} + +/* Combined Select/Submit Box */ + form .control .item.newfield { box-shadow: .125em .125em .25em; } + form .control .item.newfield select { margin-right: -1pt; } + form .control .item.newfield button { box-shadow: none; } +/**/ + +/* HACK: Delete Checkbox before delete Button */ + form .control .item.delete { + position: absolute; + bottom: .375em; left: .25em; width: auto; + padding-bottom: calc(2.25em + 2pt); + } + + form .control .item.delete input + label + button { + display: none; + position: absolute; + bottom: 0; width: 100%; + color: #800; + background-color: #FEE; + z-index: 1; + } + form .control .item.delete:after { + content: attr(label); + display: block; + position: absolute; + bottom: 0; width: 100%; + text-align: center; + color: #BAA; + padding: .25em 0; + border: 1pt solid; + box-shadow: .125em .125em .25em; + } + form .control .item.delete input:checked + label + button { display: block; } +/**/ + +@media(min-width: 80em) { + form .control { padding: .25em; min-height: 16em; } + form .control .item { width: 100%; } + form .control .item.newfield select { width: calc(100% - 2.5em); } + form .control .item.delete { bottom: .125em; right: .25em; } +} + +/* ======= LIST ITEMS, Courses ======= */ + +form.course .dtstart input[name=DTS_YEAR], +form.course .dtstart select[name=DTS_MONTH] { width: calc(50% - 1.25em); } +form.course .dtstart input[name=DTS_YEAR] { margin-right: -.375em; } +form.course .dtstart table { width: 100%; margin: 1em 0; } +form.course .dtstart table td { text-align: right; -border: .5pt solid; } +form.course .dtstart table input[type=radio] { display: none; } +form.course .dtstart table input[type=radio] + label { + display: block; + width: 100%; + margin: 0; padding: 0 3pt; +} +form.course .dtstart table input[type=radio]:checked + label { + font-weight: bold; + padding: 0 2pt; + box-shadow: .125em .125em .25em; +} + +form.course .dtstart label.DTSTIME { + display: inline-block; + font-weight: bold; + margin: 0; + width: calc(100% - 7.875em); +} +form.course .dtstart input[name=DTS_HOUR], +form.course .dtstart input[name=DTS_MINUTE] { + vertical-align: baseline; + width: 3.5em; + margin-bottom: 0; +} + +form.course .recur .item { white-space: nowrap; } +form.course .recur .item > * { margin-bottom: 0; vertical-align: baseline; } +form.course .recur input[name=RRULE_INTERVAL], +form.course .recur input[name=RRULE_COUNT], +form.course .recur input[name=RRULE_UMONTH], +form.course .recur input[name=RRULE_UDAY] { width: 3.5em; } +form.course .recur input[name=RRULE_UYEAR] { width: 4.5em; } +form.course .recur input[name=RRULE_UYEAR], +form.course .recur input[name=RRULE_UMONTH], +form.course .recur input[name=RRULE_UDAY] { + margin-right: -.375em; +} + +form.course .attendance div.attendance { + max-height: 16em; + overflow-y: scroll; +} +form.course .attendance label { + display: inline-block; + max-width: calc(100% - 2em); + vertical-align: top; + margin-bottom: 0; +} +form.course .attendance input { margin-top: .375em; } + +/* ======== Categories Page ======== */ + +body.categories form ul { list-style: none; margin: 0; } + +form.categories li { + display: inline-block; + background-color: #EEE; + margin-right: .5em; margin-bottom: .5em; + padding-left: .5em; + box-shadow: .125em .125em .25em; +} +form.categories li button[name=remove] { + font-size: .75em; + width: 2.5em; + background-color: #FBB; + overflow: hidden; + white-space: pre; +} +form.categories li button[name=remove]:before { + content: '\274C '; + margin-right: 3em; +} + +form.categories li:last-child { padding-left: 0 } + +body.categories form.namelist ul.namelist > li:nth-of-type(2n + 1) { background-color: #EEE; } +body.categories form.namelist ul.namelist > li h2, +body.categories form.namelist ul.namelist > li ul { + display: inline-block; +} +body.categories form.namelist ul.namelist > li h2 { + width: 20%; + min-width: 10em; +} +body.categories form.namelist ul.namelist > li ul li { + display: inline-block; }