encadre

Encadre, petit framework web Python (Flask) : contrôleurs en greffons, validation, tests
git clone https://git.schurger.org/encadre.git
Log | Files | Refs

style.less (3049B)


      1 // Paramètres principaux
      2 // ---------------------
      3 
      4 @main-font-size: 12pt;
      5 @main-hue: 275;
      6 @table-hue: 176;
      7 
      8 .border(@color, @radius: 1pt) {
      9     border: 1px solid darken(@color, 20%);
     10     border-radius: @radius;
     11 }
     12 
     13 .header(@level) {
     14     color: @dark-color;
     15     font-size: @main-font-size + (4 - @level) * 4pt;
     16 }
     17 
     18 .spacing() {
     19     margin-left: auto;
     20     margin-right: auto;
     21     margin-bottom: 10pt;
     22     margin-top:  15pt;
     23     padding: 5pt;
     24 }
     25 
     26 .shadow() {
     27     .border(@light-color, 4pt);
     28     box-shadow: 2px 2px 3px @light-color;
     29     .spacing();
     30 }
     31 
     32 // Paramètres dérivés
     33 // ------------------
     34 
     35 @dark-color: hsl(@main-hue, 90%, 15%);
     36 @light-color: hsl(@main-hue, 25%, 60%);
     37 @mixed-color: mix(@dark-color, @light-color);
     38 @background-color: hsl(@main-hue, 85%, 95%);
     39 
     40 @table-color: hsl(@table-hue, 60%, 95%);
     41 @title-color: hsl(@table-hue, 80%, 90%);
     42 
     43 // Disposition générale
     44 // --------------------
     45 
     46 @media print  { .noprint  { display: none; } }
     47 @media screen { .noscreen { display: none; } }
     48 
     49 html {
     50     font-family: arial;
     51     font-size: @main-font-size;
     52 }
     53 
     54 
     55 // Title
     56 #body > h1 {
     57     margin-top: 64px;
     58     text-align: center;
     59     margin-bottom: 64px;
     60 }
     61 
     62 .logo {
     63     position: absolute;
     64     right: 32px;
     65     top: 8px;
     66     margin-bottom: 100px;
     67 }
     68 
     69 li {  list-style-type: none; }
     70 // Titres
     71 // ------
     72 
     73 .section-number {
     74     color: @light-color;
     75     padding-right: 10pt;
     76 }
     77 
     78 h1 {
     79     .header(1);
     80 }
     81 
     82 h2 {
     83     .header(2);
     84 }
     85 
     86 h3 {
     87     .header(3);
     88 }
     89 
     90 .side-title {
     91     .header(3);
     92     font-weight: bold;
     93 }
     94 
     95 // Liens
     96 // -----
     97 
     98 :link {
     99     border-bottom: 1px dotted @mixed-color;
    100     color: @dark-color;
    101     text-decoration: none;
    102 }
    103 
    104 :visited {
    105     border-bottom: 1px dotted @mixed-color;
    106     color: @light-color;
    107     text-decoration: none;
    108 }
    109 
    110 :link:hover, :visited:hover {
    111                  color: @mixed-color;
    112              }
    113 
    114 // Exemples
    115 // --------
    116 
    117 b {
    118     color: @dark-color;
    119 }
    120 
    121 code {
    122     background-color: @background-color;
    123     .border(@light-color);
    124     font-size: 90%;
    125 }
    126 
    127 pre code {
    128     background-color: none;
    129     border: none;
    130 }
    131 
    132 pre {
    133     background-color: @background-color;
    134     font-family: courier, monospace;
    135     font-size: 90%;
    136     overflow: auto;
    137     .shadow();
    138 }
    139 
    140 textarea {
    141     overflow-x: auto;
    142 }
    143 
    144 // Images
    145 // ------
    146 
    147 img {
    148     .shadow();
    149 }
    150 
    151 .noshadow {
    152     border: none;
    153     box-shadow: none;
    154 }
    155 
    156 // Enumérations
    157 // ------------
    158 
    159 dt {
    160     font-weight: bold;
    161 }
    162 
    163 // Tables
    164 // ------
    165 
    166 table {
    167     background: @table-color;
    168     .shadow();
    169 }
    170 .root {
    171     border-bottom: none;
    172 }
    173 th {
    174     background: @title-color;
    175     .border(@title-color);
    176     padding: 5px;
    177     vertical-align: top;
    178 }
    179 
    180 td {
    181     background: @table-color;
    182     .border(@table-color);
    183     font-family: courier, monospace;
    184     padding: 2px;
    185     vertical-align: top;
    186 }
    187 
    188 
    189 #src_file {
    190     padding: 8px;
    191     float: right;
    192     font-size:10px;
    193     color: #ccc;
    194 }
    195 
    196 .task-status {
    197     margin-right: 4px;
    198     padding-left: 4px;
    199     padding-right: 4px;
    200     .todo {
    201         background: red;
    202         color: white;
    203     }
    204     .done {
    205         background: green;
    206         color: white;
    207     }
    208 }