Changeset 35300


Ignore:
Timestamp:
2021-08-17T10:22:24+12:00 (3 years ago)
Author:
davidb
Message:

Implement checkbox styles

Location:
main/trunk/model-interfaces-dev/atea/style
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-interfaces-dev/atea/style/asr.scss

    r35297 r35300  
    1414hr {
    1515    @extend .divider;
     16}
     17
     18input[type="checkbox"] {
     19    @extend .switch;
    1620}
    1721
     
    97101
    98102    & .transcription__list {
    99         margin-left: 1em;
     103        margin-left: 2em;
    100104    }
    101105}
  • main/trunk/model-interfaces-dev/atea/style/material.scss

    r35297 r35300  
    11/* === Start theme definitions === */
    22
     3$primary-bg-color-l1: #249ccf;
     4
    35:root {
     6    --primary-bg-color-l1: #249ccf;
    47    --primary-bg-color: #2191c0;
    58    --primary-bg-color-d1: #2785ad;
     
    182185}
    183186
     187/* Switches */
     188
     189// https://codepen.io/avstorm/pen/jOEpBLW
     190.switch
     191{
     192    -webkit-appearance: none;
     193    -moz-appearance: none;
     194    appearance: none;
     195
     196    -webkit-tap-highlight-color: transparent;
     197    cursor: pointer;
     198
     199    height: 16px;
     200    width: 38px;
     201    border-radius: 8px;
     202    display: inline-block;
     203    position: relative;
     204    margin: 1em;
     205    background-color: #c7c7c7;
     206    @include transition-set;
     207
     208    &:focus {
     209        outline: 0;
     210    }
     211
     212    &::after {
     213        content: '';
     214        position: absolute;
     215        display: inline-block;
     216        top: -4px;
     217        left: -4px;
     218        width: 24px;
     219        height: 24px;
     220        border-radius: 50%;
     221        background: white;
     222        box-shadow: var(--primary-box-shadow-thin);
     223        @include transition-set;
     224    }
     225
     226    &:checked {
     227        background-color: scale-color($primary-bg-color-l1, $alpha: -60%);
     228
     229        &::after {
     230            transform: translatex(22px);
     231            background: var(--primary-bg-color-l1);
     232        }
     233    }
     234}
     235
    184236/* === End component definitions === */
    185237
Note: See TracChangeset for help on using the changeset viewer.