Changeset 741


Ignore:
Timestamp:
Dec 29, 2020 3:18:44 AM (3 years ago)
Author:
anonymous
Message:

Remove excess whitespace and comments from css

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/css/admin.inc.css

    r457 r741  
    1 /**
    2  * admin.inc.css
    3  *
    4  * CSS for a Strangecode administration site.
    5  */
     1/*
     2* admin.inc.css
     3*/
    64
    7 /*_____________________ GLOBAL ____________________*/
     5/*
     6GLOBAL
     7*/
    88body {
    99    background: #fff;
     
    1313    color: #000;
    1414}
    15 
    1615a:link,
    1716a:visited { color: #336; text-decoration: underline; }
    1817a:hover   { color: #C30; text-decoration: none; }
    1918a:active  { color: #336; }
    20 
    2119pre { margin: 0; }
    22 
    23 /*_____________________ MISC ____________________*/
    24 
    25 /* The following are here in addition to in utilities.inc.css only because I want the font size 70%. Is there a more general way to do this? There currently are NO font-size specifications in utilities.inc.css or codebase.inc.css. That seems safest, but requires that they are redefined anyways (like here for eg). Have you figured out how to do font sizes correctly? */
    26 
    27 /* Why does having a form change the presentation of the page? Don't do that. */
     20/*
     21MISC
     22*/
    2823form { margin: 0; }
    29 
    3024form label {
    3125    font-size: 70%;
     
    3327    font-weight: bold;
    3428}
    35 
    3629.help,
    3730.sc-help,
    3831.commandtext,
    3932.commanditem { font-size: 70%; }
    40 
    4133/* For fv err applied to tds. */
    4234td.sc-msg-warning,
     
    4840    border: none;
    4941}
    50 
    51 
    52 /*_____________________ HEADER ____________________*/
     42/*
     43HEADER
     44*/
    5345#userinfo {
    5446    width: 98%;
     
    5850    text-align: right;
    5951}
    60 
    6152#userinfo p {
    6253    margin: 0;
    6354    padding: 0;
    6455}
    65 
    6656#container {
    6757    width: 98%;
     
    7060    border: 1px solid gray;
    7161}
    72 
    7362#top {
    7463    border-bottom: 1px solid gray;
     
    7665    padding: .5em;
    7766}
    78 
    7967#top h1 {
    8068    margin: 0;
     
    8371    color: #000;
    8472}
    85 
    86 /*_____________________ NAVIGATION ____________________*/
     73/*
     74NAVIGATION
     75*/
    8776#leftnav {
    8877    float: left;
     
    9382    background-color: #EEE;
    9483}
    95 
    9684#leftnav ul {
    9785    padding: 0;
     
    9987    width: 9em;
    10088}
    101 
    10289#leftnav #navlist li {
    10390    list-style: none;
     
    10996    font-weight: bold;
    11097}
    111 
    11298#leftnav #navlist li a {
    11399    text-decoration: none;
    114100    padding: 1px;
    115101}
    116 
    117102#leftnav #navlist li.label {
    118103    color: #999;
     
    121106    font-weight: bold;
    122107}
    123 
    124108#leftnav a.addlink {
    125109    margin-left: 0.5em;
    126110    font-weight: normal;
    127111}
    128 
    129112#leftnav #navlist li a:link, #navlist li a:visited {
    130113    color: #336;
    131114}
    132 
    133115#leftnav #navlist li a:hover, #navlist li a:active {
    134116    color: #C00;
    135117}
    136 
    137 /*_____________________ CONTENT ____________________*/
     118/*
     119CONTENT
     120*/
    138121#content {
    139122    margin-left: 9em;
     
    142125    background-color: #FFF;
    143126}
    144 
    145127#content h1, #content h2, #content h3, #content h4, #content h5 {
    146128    margin: 0 0 .5em 0;
     
    150132#content h3 { font-size: 90%; }
    151133#content h4 { font-size: 75%; }
    152 
    153134#content p {
    154135    margin: 0 0 .5em 0;
     
    156137    line-height: 130%;
    157138}
    158 
    159139#content li {
    160140    margin: 0 0 0 0;
     
    162142    line-height: 100%;
    163143}
    164 
    165 /*_____________________ TABLES ____________________*/
    166 /* BEAU: I copied this from NEXT. Please help! */
     144/*
     145TABLES
     146*/
    167147table {
    168148    border-size: 1px;
     
    170150    border-spacing: 0;
    171151}
    172 
    173152th {
    174153    padding: 2px;
     
    177156    white-space: nowrap;
    178157}
    179 
    180158td {
    181159    vertical-align: top;
    182160    padding: 8px 6px 0 0;
    183161}
    184 
    185162table.list {
    186163    border-size: 1px;
     
    188165    margin: 4px 0;
    189166}
    190 
    191167table.list th {
    192168    padding: 0 6px 1px 2px;
     
    195171    border-bottom: 2px solid #eee;
    196172    background-color: #ddd;
    197 /*  border-bottom: 1px solid #000; */
    198 }
    199 
     173}
    200174table.list td, #commandbox table td {
    201175    font-size: 70%;
     
    204178    vertical-align: top;
    205179}
    206 
    207180table.list tr:hover, #commandbox table tr:hover {
    208181    background: #FAF8C7;
    209182}
    210 
    211 
    212 /* BEAU: The old stuff that was here...
    213 #content table {
    214          background-color: #FFF;
    215 }
    216 
    217 #content th {
    218     padding: 2px;
    219     text-align: left;
    220     vertical-align: middle;
    221     white-space: nowrap;
    222 }
    223 
    224 #content td {
    225     vertical-align: top;
    226 }
    227 
    228 #content table.list {
    229     width: 99%;
    230     margin: 4px 0;
    231     background-color: #FFF;
    232 }
    233 
    234 #content table.list th {
    235     padding-right: 6px;
    236     font-size: 70%;
    237     background-color: #CCC;
    238     border-bottom: 1px solid #000;
    239 }
    240 
    241 #content table.list td {
    242     font-size: 70%;
    243     padding: 2px;
    244     border-bottom: 1px dotted #000;
    245 }
    246 */
    247 
    248 /*_____________________ COMMANDS ____________________*/
    249 
    250 /* Should this be an ID??? */
     183/*
     184COMMANDS
     185*/
    251186#commandbox, .commandbox
    252187{
     
    257192    color: inherit;
    258193}
    259 
    260194.commanditem
    261195{
     
    263197    white-space: nowrap;
    264198}
    265 
    266199#commandbox .form, .commandbox .form, #commandbox form, .commandbox form, {
    267200    margin-top: 8px;
    268201}
    269 
    270 /* I replaced all instances of commandtext with commanditem on the SC admin, but leave it here for sites I didn't. */
    271202.commandtext
    272203{
    273204    padding-right: 1em;
    274205}
    275 
    276206.command_left
    277207{
     
    279209    white-space: nowrap;
    280210}
    281 
    282211.command_right
    283212{
     
    287216    float: right;
    288217}
    289 
    290 
    291 /*_____________________ FOOTER ____________________*/
     218/*
     219FOOTER
     220*/
    292221#footer {
    293222    clear: both;
     
    300229    line-height: 100%;
    301230}
    302 
    303231#footer a:link,
    304232#footer a:visited {
     
    306234    text-decoration: none;
    307235}
    308 
    309236#footer a:active,
    310237#footer a:hover {
  • trunk/css/admin2.inc.css

    r731 r741  
    1 /**
    2  * admin2.inc.css
    3  *
    4  * CSS for the Strangecode administration sites.
    5  */
     1/*
     2* admin2.inc.css
     3*/
    64
    7 /*_____________________ GLOBAL ____________________*/
     5/*
     6GLOBAL
     7*/
    88body {
    99    background: #fff;
     
    1313    color: #000;
    1414}
    15 
    1615a:link,
    1716a:visited   { color: #227899; text-decoration: none; border: none; }
    1817a:hover     { color: #000; text-decoration: none; border: none; }
    1918a:active    { color: #00b8ff; text-decoration: none; border: none; }
    20 
    2119pre { margin: 0; }
    22 
    23 /*_____________________ MISC ____________________*/
    24 
    25 /* The following are here in addition to in utilities.inc.css only because I want the font size 70%. Is there a more general way to do this? There currently are NO font-size specifications in utilities.inc.css or codebase.inc.css. That seems safest, but requires that they are redefined anyways (like here for eg). Have you figured out how to do font sizes correctly? */
    26 
    27 /* Why does having a form change the presentation of the page? Don't do that. */
    28 /* form { margin: 0; }
    29 
    30 form label {
    31     font-size: 70%;
    32     max-width: 25em;
    33     font-weight: bold;
    34 }
    35  */
     20/*
     21MISC
     22*/
    3623.help,
    3724.sc-help,
    3825.commandtext,
    3926.commanditem { font-size: 0.7rem; }
    40 
    4127/* For fv err applied to tds. */
    4228td.sc-msg-warning,
     
    4834    border: none;
    4935}
    50 
    5136img {
    5237    border: 0;
    5338    vertical-align: middle;
    5439}
    55 
    5640#container-columns {
    5741    width: 100%;
    5842}
    59 
    60 /*_____________________ HEADER ____________________*/
     43/*
     44HEADER
     45*/
    6146#userinfo {
    6247    width: 98%;
     
    6550    text-align: right;
    6651}
    67 
    6852#userinfo p {
    6953    margin: 0;
    7054    padding: 0;
    7155}
    72 
    7356#container {
    7457    width: 98%;
     
    7760    border: 1px solid gray;
    7861}
    79 
    8062#top {
    8163    border-bottom: 1px solid gray;
     
    8365    padding: .5em;
    8466}
    85 
    8667#top h1 {
    8768    margin: 0;
     
    9071    color: #000;
    9172}
    92 
    93 /*_____________________ NAVIGATION ____________________*/
     73/*
     74NAVIGATION
     75*/
    9476#leftnav {
    9577/*     float: left; */
     
    10183    background-color: #EEE;
    10284}
    103 
    10485#leftnav ul {
    10586    padding: 0;
    10687    margin: 0;
    10788}
    108 
    10989#leftnav #navlist li {
    11090    list-style: none;
     
    11696    font-weight: bold;
    11797}
    118 
    11998#leftnav #navlist li a {
    12099    text-decoration: none;
    121100    padding: 1px;
    122101}
    123 
    124102#leftnav #navlist li.label {
    125103    color: #999;
     
    128106    font-weight: bold;
    129107}
    130 
    131108#leftnav a.addlink {
    132109    margin-left: 0.25em;
    133110    font-weight: normal;
    134111}
    135 
    136 #leftnav #navlist li a:link, #navlist li a:visited {
    137     /* color: #336; */
    138 }
    139 
    140 #leftnav #navlist li a:hover, #navlist li a:active {
    141     /* color: #C00; */
    142 }
    143 
    144 /*_____________________ CONTENT ____________________*/
    145 
     112/*
     113CONTENT
     114*/
    146115#content-table {
    147116    width: 100%;
    148117}
    149 
    150118#content {
    151 /*     width: 100%; */
    152 /*     margin-left: 1em; */
    153 /*     border-left: 1px solid gray; */
    154119    padding: 0.75em 0.5em 15px 0.75em;
    155120    background-color: #FFF;
    156121}
    157 
    158122#content h1, #content h2, #content h3, #content h4, #content h5 {
    159123    margin: 0 0 .5em 0;
     
    163127#content h3 { font-size: 0.9rem; }
    164128#content h4 { font-size: 0.75rem; }
    165 
    166129#content p,
    167130#content ul,
     
    171134    line-height: 130%;
    172135}
    173 
    174 /* li:not(.ui-tab) {
    175     list-style-position: inside;
    176     list-style: disc;
    177     margin-left: 1.2em;
    178 } */
    179136ul.normal li,
    180137ol.normal li {
     
    183140    margin-left: 1.2em;
    184141}
    185 
    186 /*_____________________ TABLES ____________________*/
     142/*
     143TABLES
     144*/
    187145table {
    188146    border-size: 1px;
     
    190148    border-spacing: 0;
    191149}
    192 
    193150th {
    194151    padding: 2px;
     
    197154    white-space: nowrap;
    198155}
    199 
    200156td {
    201157    vertical-align: top;
    202158    padding: 8px 6px 0 0;
    203159}
    204 
    205160table.list {
    206161    border-size: 1px;
     
    208163    margin: 6px 0;
    209164}
    210 
    211165table.list th {
    212166    padding: 0 6px 1px 2px;
     
    215169    border-bottom: 2px solid #eee;
    216170    background-color: #ddd;
    217 /*  border-bottom: 1px solid #000; */
    218 }
    219 
     171}
    220172table.list td, #commandbox table td, .commandbox table td {
    221173    font-size: 0.7rem;
     
    224176    vertical-align: top;
    225177}
    226 
    227178table.list tr:hover, #commandbox table tr:hover, .commandbox table tr:hover {
    228179    background: #FAF8C7 !important;
    229180}
    230 
    231 /*_____________________ COMMANDS ____________________*/
    232 
    233 /* We were using an ID, now using class. */
     181/*
     182COMMANDS
     183*/
    234184#commandbox, .commandbox
    235185{
     
    240190    color: inherit;
    241191}
    242 
    243192.commanditem
    244193{
     
    246195    white-space: nowrap;
    247196}
    248 
    249197#commandbox form, .commandbox form {
    250198    margin: 8px 0 0 0;
    251199}
    252 
    253 /* I replaced all instances of commandtext with commanditem on the SC admin, but leave it here for sites I didn't. */
     200/* Keep for backwards-compatibility. */
    254201.commandtext
    255202{
    256203    padding-right: 1em;
    257204}
    258 
    259205.command_left
    260206{
     
    262208    white-space: nowrap;
    263209}
    264 
    265210.command_right
    266211{
     
    270215    float: right;
    271216}
    272 
    273 
    274 /*_____________________ FOOTER ____________________*/
     217/*
     218FOOTER
     219*/
    275220#footer {
    276221    clear: both;
     
    283228    line-height: 100%;
    284229}
    285 
    286230#footer a:link,
    287231#footer a:visited {
     
    289233    text-decoration: none;
    290234}
    291 
    292235#footer a:active,
    293236#footer a:hover {
     
    295238    text-decoration: underline;
    296239}
    297 
    298 /* Form Defaults ---------------------------------------------------- */
    299 
     240/*
     241Form Defaults
     242*/
    300243.sc-form {
    301244    width: 100%;
    302245    margin: 1em 0;
    303246}
    304 
    305247.sc-form-row {
    306248    margin: .5em 0;
    307249}
    308250.sc-form-row:after { content: " "; display: block; visibility: hidden; clear: both; height: 0.1px; font-size: 0.1em; line-height: 0; } /* clear floats - Ydnar Hack */
    309 
    310251fieldset {
    311252    margin: 1em 0 0 0;
     
    313254    border: 0;
    314255}
    315 
    316256legend {
    317257    font-size: 90%;
     
    320260    margin: 0;
    321261}
    322 
    323262.sc-form textarea,
    324263.sc-tiny,
     
    340279    border: none;
    341280}
    342 
    343281textarea {
    344282    padding: 0 2px;
    345283}
    346 
    347284.sc-form-row label {
    348285    font-size: 0.7rem;
    349286    padding-top: 0.25em;
    350287}
    351 
    352 .sc-form-row label { /* Modified by Matt. Was .sc-form-row>label:first-child */
     288.sc-form-row label {
    353289    display: block;
    354290    width: 120px;
     
    358294    font-style: italic;
    359295}
    360 
    361296.sc-form-row label.sc-label-secondary {
    362297    display: inline;
     
    367302    font-style: normal;
    368303}
    369 
    370304.sc-form label span {
    371305    visibility: hidden;
    372306}
    373 
    374 /*.sc-form-row input + input {
    375     margin-top: .5rem;
    376     margin-bottom: .5rem;
    377 } */
    378 
    379307input[type="submit"],
    380308input[type="button"] {
     
    384312    background-color: #eee;
    385313}
    386 
    387314.sc-submit-buttons {
    388315    margin: 20px 0 20px 130px;
     
    391318    margin-left: 130px;
    392319}
    393 
    394320label.sc-radio-label {
    395321    width: auto;
    396322}
    397 
    398323/* Hide foundation elements for sites still using old admin css. */
    399324.sc-msg .close {
  • trunk/css/codebase.inc.css

    r666 r741  
    1 /**
    2  * codebase.inc.css
    3  *
    4  * CSS used in codebase templates and scripts that generate HTML. 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  */
     1/*
     2* codebase.inc.css
     3*
     4* CSS used in codebase templates and scripts that generate HTML. 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*/
    99
    10 /* App.inc.php ------------------------------------------------------ */
     10/* App.inc.php */
    1111.sc-msg {
    12     z-index: 2000000000;  /* Close to the maximum of a 32-bit integer. */
     12    z-index: 2000000000; /* Close to the maximum of a 32-bit integer. */
    1313    margin: 1em 0;
    1414    background: #fafafa;
     
    4343.sc-msg > .sc-msg-warning { background-color: #9200AE; }
    4444.sc-msg > .sc-msg-error { background-color: #b34; }
    45 
    46 /* PEdit.inc.php ---------------------------------------------------- */
     45/* PEdit.inc.php */
    4746.sc-pedit-form {}
    4847.sc-pedit-item,
     
    6463    white-space: nowrap;
    6564}
    66 
    67 /* Utilities.inc.php ------------------------------------------------ */
     65/* Utilities.inc.php */
    6866.sc-highlightwords {
    6967    background-color: #EBFE00;
    7068    color: #000;
    7169}
    72 
    73 /* Captcha.inc.php -------------------------------------------------- */
     70/* Captcha.inc.php */
    7471#sc-captcha {
    7572    font-size: 0.5em;
  • trunk/css/utilities.inc.css

    r666 r741  
    11/**
    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  */
     2* utilities.inc.css
     3* Global utility styles often in Strangecode applications.
     4*/
    95
    10 /*_____________________ FORMS ____________________*/
    11 
     6/*
     7FORMS
     8*/
    129input.sc-micro, textarea.sc-micro, select.sc-micro,
    1310input.sc-tiny, textarea.sc-tiny, select.sc-tiny,
     
    1916    box-sizing: border-box;
    2017}
    21 
    2218/*
    2319The following widths are calculated to include a small right-margin and be equally divisible so the right edges align.
     
    3935input.sc-large, textarea.sc-large, select.sc-large, label.sc-large      { width: 43.5rem; }
    4036input.sc-full, textarea.sc-full, select.sc-full, label.sc-full          { width: 100%; }
    41 
    4237textarea.sc-twolines, select.sc-twolines              { height: 3.5rem; }
    4338textarea.sc-short, select.sc-short                    { height: 8rem; }
    4439textarea.sc-tall, select.sc-tall                      { height: 25rem; }
    4540textarea.sc-fullscreen, select.sc-fullscreen          { height: 40rem; }
    46 
    47 /*_____________________ UTILITIES ____________________*/
     41/*
     42UTILITIES
     43*/
    4844.sc-center { text-align: center; }
    4945.sc-clearboth { clear: both; }
     
    7773    text-overflow: ellipsis;
    7874}
    79 
    8075/* .sc-pkg class wraps enclosing block element around inner floated elements */
    8176.sc-pkg:after { content: " "; display: block; visibility: hidden; clear: both; height: 0.1px; font-size: 0.1em; line-height: 0.0; }
  • trunk/lib/Cart.inc.php

    r611 r741  
    4040        if ($p = mysql_fetch_assoc($qid)) {
    4141            $cart->add($product_id, $p['price'], 1, array(
    42                 'title' => $p['title'],
     42                'name' => $p['name'],
    4343                'shipping' => $p['shipping'],
    4444                'weight' => $p['weight'],
     
    6262    // User views cart.
    6363    foreach ($cart->getList() as $item) {
    64         printf("Item: %s\nQty: %s\nPrice: %s\n\n", $item['title'], $item['quantity'], $item['price']);
     64        printf("Item: %s\nQty: %s\nPrice: %s\n\n", $item['name'], $item['quantity'], $item['price']);
    6565    }
    6666    break;
     
    132132    * @param    float   $price      Price-per-quantity-unit for the item
    133133    * @param    float   $quantity   Quantity of items (can be fractional unites?)
    134     * @param    array   $specs      An array of additional specifications (title, weight, etc)
     134    * @param    array   $specs      An array of additional specifications (name, weight, etc)
    135135    * @return   float               The new adjusted quantity of this item.
    136136    * @author   Quinn Comendant <quinn@strangecode.com>
  • trunk/lib/Utilities.inc.php

    r738 r741  
    16831683    }
    16841684}
     1685
     1686/*
     1687* Test if a string is valid json.
     1688* https://stackoverflow.com/questions/6041741/fastest-way-to-check-if-a-string-is-json-in-php
     1689*
     1690* @access   public
     1691* @param    string  $str  The string to test.
     1692* @return   boolean       True if the string is valid json.
     1693* @author   Quinn Comendant <quinn@strangecode.com>
     1694* @since    06 Dec 2020 18:41:51
     1695*/
     1696function isJSON($str)
     1697{
     1698    json_decode($str);
     1699    return (json_last_error() === JSON_ERROR_NONE);
     1700}
Note: See TracChangeset for help on using the changeset viewer.