Dotclear


Ignore:
Timestamp:
01/04/17 10:20:59 (9 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Adaptive admin font size is now optional

Location:
admin/style
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/style/default.css

    r3468 r3499  
    245245  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; } 
    246246  @media screen and (max-width: 26.5em) { 
    247     body { 
     247    body.responsive-font { 
    248248      font-size: 1.2rem; 
    249249      line-height: 1.3; } } 
    250250  @media screen and (min-width: 120em) { 
    251     body { 
     251    body.responsive-font { 
    252252      font-size: 1.6rem; 
    253253      line-height: 1.5; } } 
    254254  @media screen and (min-width: 26.5em) and (max-width: 120em) { 
    255     body { 
     255    body.responsive-font { 
    256256      font-size: calc( 1.2rem + 0.4 * (100vw - 42.4rem) / (192 - 42.4)); 
    257257      line-height: calc( 1.3em + (1.5 - 1.3) * (100vw - 42.4rem) / (192 - 42.4)); } } 
  • admin/style/scss/partials/_common.scss

    r3439 r3499  
    22 
    33:root { 
    4     // May be superseed by user pref (typically from 50% to 75%, default 62.5%) 
    5     --html-font-size: #{$html-font-size}; 
     4     // May be superseed by user pref (typically from 50% to 75%, default 62.5%) 
     5     --html-font-size: #{$html-font-size}; 
    66} 
    77 
    88// base // 
    99html { 
    10     font-size: $html-font-size; // html font-size for IE and Edge 
    11     font-size: var(--html-font-size); // html font-size for modern browsers 
     10     font-size: $html-font-size; // html font-size for IE and Edge 
     11     font-size: var(--html-font-size); // html font-size for modern browsers 
    1212} 
    1313 
    1414body { 
    15     font-size: $body-font-size; 
    16     line-height: 1.5; 
    17     @media screen and(max-width: $small-screen) { 
    18         font-size: $body-font-size-small; 
    19         line-height: 1.3; 
    20     } 
    21     @media screen and(min-width: $large-screen) { 
    22         font-size: $body-font-size-large; 
    23         line-height: 1.5; 
    24     } 
    25     @media screen and(min-width: $small-screen) and (max-width: $large-screen) { 
    26         font-size: calc( #{$body-font-size-small} + #{strip-unit($body-font-size-large - $body-font-size-small)} * (100vw - #{strip-unit(relative-to-screen($small-screen,$html-font-size))}rem) / (#{strip-unit(relative-to-screen($large-screen,$html-font-size))} - #{strip-unit(relative-to-screen($small-screen,$html-font-size))})); 
    27         line-height: calc( 1.3em + (1.5 - 1.3) * (100vw - #{strip-unit(relative-to-screen($small-screen,$html-font-size))}rem) / (#{strip-unit(relative-to-screen($large-screen,$html-font-size))} - #{strip-unit(relative-to-screen($small-screen,$html-font-size))})); 
    28     } 
    29     font-family: $sans-serif; 
     15     font-size: $body-font-size; 
     16     line-height: 1.5; 
     17     font-family: $sans-serif; 
     18     &.responsive-font { 
     19          @media screen and(max-width: $small-screen) { 
     20               font-size: $body-font-size-small; 
     21               line-height: 1.3; 
     22          } 
     23          @media screen and(min-width: $large-screen) { 
     24               font-size: $body-font-size-large; 
     25               line-height: 1.5; 
     26          } 
     27          @media screen and(min-width: $small-screen) and (max-width: $large-screen) { 
     28               font-size: calc( #{$body-font-size-small} + #{strip-unit($body-font-size-large - $body-font-size-small)} * (100vw - #{strip-unit(relative-to-screen($small-screen,$html-font-size))}rem) / (#{strip-unit(relative-to-screen($large-screen,$html-font-size))} - #{strip-unit(relative-to-screen($small-screen,$html-font-size))})); 
     29               line-height: calc( 1.3em + (1.5 - 1.3) * (100vw - #{strip-unit(relative-to-screen($small-screen,$html-font-size))}rem) / (#{strip-unit(relative-to-screen($large-screen,$html-font-size))} - #{strip-unit(relative-to-screen($small-screen,$html-font-size))})); 
     30          } 
     31     } 
    3032} 
    3133 
    3234#wrapper { 
    33     @media screen and (max-width: $small-screen) { 
    34         font-size: 1.4em; 
    35     } 
     35     @media screen and (max-width: $small-screen) { 
     36          font-size: 1.4em; 
     37     } 
    3638} 
    3739 
     
    4446h5, 
    4547h6 { 
    46     margin-top: 0; 
    47     margin-bottom: 1em; 
     48     margin-top: 0; 
     49     margin-bottom: 1em; 
    4850} 
    4951 
    5052h2 { 
    51     font-size: 1.5em; 
    52     font-weight: normal; 
    53     line-height: 1.25; 
    54     padding: 0 0 1.5em; 
     53     font-size: 1.5em; 
     54     font-weight: normal; 
     55     line-height: 1.25; 
     56     padding: 0 0 1.5em; 
    5557} 
    5658 
    5759h3, 
    5860.as_h3 { 
    59     font-size: 1.34em; 
    60     font-weight: normal; 
    61     line-height: 1.5; 
    62     margin-top: 1em; 
     61     font-size: 1.34em; 
     62     font-weight: normal; 
     63     line-height: 1.5; 
     64     margin-top: 1em; 
    6365} 
    6466 
    6567h4, 
    6668.as_h4 { 
    67     font-size: 1.16em; 
    68     line-height: 1.5; 
     69     font-size: 1.16em; 
     70     line-height: 1.5; 
    6971} 
    7072 
    7173h5 { 
    72     font-size: 1em; 
    73     line-height: 1.5; 
    74     font-weight: bold; 
     74     font-size: 1em; 
     75     line-height: 1.5; 
     76     font-weight: bold; 
    7577} 
    7678 
    7779h6 { 
    78     font-size: 1em; 
    79     line-height: 1.5; 
     80     font-size: 1em; 
     81     line-height: 1.5; 
    8082} 
Note: See TracChangeset for help on using the changeset viewer.

Sites map