auth

Main authentication module for my projects
git clone git://git.finwo.net/app/auth
Log | Files | Refs

mockups.css (9550B)


      1 @layer mockups {
      2   /* demo chrome: the floating theme/state bar every mockup page shares */
      3   .mockup-controls {
      4     position: fixed;
      5     right: max(var(--space-4), env(safe-area-inset-right));
      6     bottom: max(var(--space-4), env(safe-area-inset-bottom));
      7     z-index: 100;
      8     display: flex;
      9     flex-wrap: wrap;
     10     align-items: center;
     11     gap: var(--space-1);
     12     width: min(calc(100vw - var(--space-8)), fit-content);
     13     padding: 0.375rem;
     14     background: var(--sidebar);
     15     color: var(--on-chrome);
     16     box-shadow: var(--shadow);
     17     font-size: var(--font-xs);
     18   }
     19 
     20   .mockup-label {
     21     padding: 0 var(--space-2);
     22     color: var(--chrome-label);
     23     font-size: 0.6875rem;
     24     font-weight: 600;
     25     letter-spacing: 0.08em;
     26     text-transform: uppercase;
     27   }
     28 
     29   .mockup-button {
     30     padding: 0.375rem 0.625rem;
     31     border: 0;
     32     background: transparent;
     33     color: var(--chrome-text);
     34     font: inherit;
     35     font-size: var(--font-xs);
     36     cursor: pointer;
     37   }
     38 
     39   .mockup-button:hover {
     40     background: var(--menu-hover);
     41     color: var(--on-chrome);
     42   }
     43 
     44   .mockup-button.is-active {
     45     background: var(--sidebar-active);
     46     color: var(--on-chrome);
     47   }
     48 
     49   .mockup-separator {
     50     width: 1pt;
     51     height: var(--space-5);
     52     margin: 0 var(--space-1);
     53     background: var(--chrome-divider);
     54   }
     55 
     56   /* demo scaffolding: a section showing component states side by side */
     57   .state-preview {
     58     margin-block-start: var(--space-8);
     59   }
     60 
     61   .state-preview > h2 {
     62     margin-block-end: var(--space-3);
     63   }
     64 
     65   /* demo stats tile row: 4-up via the framework .grid --grid-cols hook */
     66   .stats {
     67     --grid-cols: 4;
     68   }
     69 
     70   .stat-value {
     71     display: block;
     72     margin-block-start: var(--space-2);
     73     font-size: var(--font-2xl);
     74     font-weight: 300;
     75     line-height: var(--lh-tight);
     76   }
     77 
     78   .action-row {
     79     display: flex;
     80     flex-wrap: wrap;
     81     align-items: center;
     82     gap: var(--space-2);
     83     margin-block-start: var(--space-4);
     84   }
     85 
     86   /* demo tiles and swatches shown in tables and branding previews */
     87   .table-icon {
     88     display: grid;
     89     place-items: center;
     90     width: var(--space-8);
     91     height: var(--space-8);
     92     overflow: hidden;
     93     background: var(--line);
     94     color: var(--muted);
     95   }
     96 
     97   .table-icon img {
     98     width: 100%;
     99     height: 100%;
    100     object-fit: contain;
    101   }
    102 
    103   .table-icon svg {
    104     width: var(--font-xl);
    105     height: var(--font-xl);
    106   }
    107 
    108   .branding-preview {
    109     display: flex;
    110     flex-wrap: wrap;
    111     align-items: center;
    112     gap: var(--space-3);
    113     margin-block-start: var(--space-4);
    114   }
    115 
    116   .branding-logo-preview,
    117   .branding-color-preview {
    118     width: var(--space-8);
    119     height: var(--space-8);
    120     overflow: hidden;
    121     background: var(--line);
    122   }
    123 
    124   .branding-logo-preview {
    125     display: inline-flex;
    126     align-items: center;
    127     justify-content: center;
    128     color: var(--muted);
    129   }
    130 
    131   .branding-logo-preview svg {
    132     width: var(--space-5);
    133     height: var(--space-5);
    134   }
    135 
    136   .branding-logo-preview img {
    137     width: 100%;
    138     height: 100%;
    139     object-fit: contain;
    140   }
    141 
    142   .branding-color-preview {
    143     border-radius: var(--radius-sm);
    144     background: var(--accent);
    145   }
    146 
    147   .branding-logo-preview.is-empty,
    148   .branding-color-preview.is-empty {
    149     border-bottom: 1pt solid var(--field-line);
    150   }
    151 
    152   .branding-color-preview.is-empty {
    153     background: var(--line);
    154   }
    155 
    156   .branding-logo-preview .is-broken {
    157     visibility: hidden;
    158   }
    159 
    160   /* small meta line under two-line table titles; inline children so the
    161      cell keeps to platform layout */
    162   .realm-meta {
    163     display: block;
    164     color: var(--muted);
    165     font-size: var(--font-sm);
    166     line-height: var(--lh-snug);
    167   }
    168 
    169   .realm-meta > * + * {
    170     margin-inline-start: var(--space-3);
    171   }
    172 
    173   .realm-meta a {
    174     color: inherit;
    175     text-decoration: none;
    176   }
    177 
    178   .realm-meta a:hover {
    179     color: var(--accent-text);
    180     text-decoration: underline;
    181   }
    182 
    183   /* count inside a realm access link button */
    184   .realm-access-count {
    185     margin-inline-start: var(--space-2);
    186     opacity: 0.7;
    187   }
    188 
    189   /* copy button on the read-only verification record fields */
    190   .verify-record-copy {
    191     justify-self: end;
    192   }
    193 
    194   .danger-zone h2 {
    195     color: var(--danger-text);
    196   }
    197 
    198   /* settings forms: one column of fields that own their spacing */
    199   .settings-form {
    200     display: grid;
    201     gap: var(--space-4);
    202     margin-block-start: var(--space-4);
    203     min-width: 0;
    204   }
    205 
    206   .settings-form > * {
    207     margin-block-start: 0;
    208     margin-block-end: 0;
    209   }
    210 
    211   /* role checklist inside a fieldset */
    212   .role-field {
    213     margin: 0;
    214     padding: 0;
    215     border: 0;
    216   }
    217 
    218   .role-field legend {
    219     margin-block-end: var(--space-2);
    220     padding: 0;
    221   }
    222 
    223   /* auth mockups: eyebrow line above the panel title */
    224   .mockup-eyebrow {
    225     margin: 0 0 var(--space-1);
    226     font-weight: 600;
    227     letter-spacing: .08em;
    228     text-transform: uppercase;
    229   }
    230 
    231   /* auth mockups: account chooser list */
    232   .mockup-choices {
    233     --stack-gap: var(--space-2);
    234   }
    235 
    236   .mockup-choice {
    237     display: flex;
    238     flex-direction: column;
    239     align-items: flex-start;
    240     justify-content: center;
    241     gap: .125rem;
    242     width: 100%;
    243     min-height: var(--control-h);
    244     padding: var(--space-3) 0;
    245     border: 0;
    246     border-bottom: 1pt solid var(--field-line);
    247     background: none;
    248     color: inherit;
    249     font: inherit;
    250     text-align: left;
    251     cursor: pointer;
    252   }
    253 
    254   .mockup-choice:hover,
    255   .mockup-choice:focus-visible {
    256     border-bottom-color: var(--accent);
    257   }
    258 
    259   .mockup-choice-name {
    260     font-size: var(--font-md);
    261     line-height: var(--lh-base);
    262   }
    263 
    264   .mockup-choice-meta {
    265     color: var(--muted);
    266     font-size: var(--font-base);
    267     line-height: var(--lh-base);
    268   }
    269 
    270   /* auth mockups: form actions, stacked by default, right-aligned row once wide */
    271   .mockup-actions {
    272     display: grid;
    273     gap: var(--space-4);
    274   }
    275 
    276   .mockup-back {
    277     margin-inline-end: auto;
    278   }
    279 
    280   @media (min-width: 35em) {
    281     .mockup-actions {
    282       display: flex;
    283       align-items: center;
    284       justify-content: flex-end;
    285       gap: var(--space-6);
    286     }
    287   }
    288 
    289   /* auth mockups: account strip and scope list on the consent panel */
    290   .mockup-account-strip {
    291     --cluster-gap: var(--space-3);
    292     min-width: 0;
    293     padding: var(--space-3);
    294     background: var(--line-strong);
    295   }
    296 
    297   .mockup-account-strip svg {
    298     flex: none;
    299     width: 1.5rem;
    300     height: 1.5rem;
    301   }
    302 
    303   .mockup-account-strip > :last-child {
    304     flex: none;
    305     margin-inline-start: auto;
    306   }
    307 
    308   .mockup-row-body {
    309     --stack-gap: var(--space-1);
    310   }
    311 
    312   .mockup-row-title {
    313     font-size: var(--font-base);
    314     font-weight: 500;
    315     line-height: var(--lh-snug);
    316   }
    317 
    318   .mockup-row-meta {
    319     overflow-wrap: anywhere;
    320     color: var(--muted);
    321     font-size: var(--font-xs);
    322     line-height: var(--lh-snug);
    323   }
    324 
    325   .mockup-scope-list {
    326     --stack-gap: var(--space-2);
    327     margin: 0;
    328     padding: 0;
    329     list-style: none;
    330   }
    331 
    332   .mockup-scope {
    333     --cluster-gap: var(--space-2);
    334     align-items: flex-start;
    335     color: var(--muted);
    336     font-size: var(--font-base);
    337     line-height: var(--lh-base);
    338   }
    339 
    340   .mockup-scope svg {
    341     flex: none;
    342     width: 1rem;
    343     height: 1rem;
    344     margin-block-start: .125rem;
    345   }
    346 
    347   /* account mockup: capped reading column for stacked pages */
    348   .reading-column {
    349     width: 100%;
    350     max-width: 56rem;
    351     margin-inline: auto;
    352   }
    353 
    354   /* account mockup: manage rows (framework .card supplies the surface) */
    355   .summary-row {
    356     display: grid;
    357     grid-template-columns: var(--space-6) minmax(0, 1fr);
    358     align-items: center;
    359     gap: var(--space-4);
    360     color: inherit;
    361     text-decoration: none;
    362     cursor: pointer;
    363     user-select: none;
    364   }
    365 
    366   .summary-row:hover,
    367   .summary-row:active {
    368     background: var(--line-strong);
    369   }
    370 
    371   .summary-row svg {
    372     width: var(--space-5);
    373     height: var(--space-5);
    374   }
    375 
    376   .summary-body {
    377     display: grid;
    378     gap: var(--space-1);
    379     min-width: 0;
    380   }
    381 
    382   .summary-title {
    383     font-size: var(--font-md);
    384     font-weight: 500;
    385     line-height: var(--lh-snug);
    386   }
    387 
    388   .summary-meta {
    389     color: var(--muted);
    390     font-size: var(--font-sm);
    391     line-height: var(--lh-snug);
    392   }
    393 
    394   .summary-arrow {
    395     display: none;
    396     color: var(--muted);
    397     font-size: var(--font-xl);
    398     line-height: 1;
    399   }
    400 
    401   /* account mockup: panel heading with leading icon */
    402   .panel-heading {
    403     display: flex;
    404     align-items: center;
    405     gap: var(--space-3);
    406     margin-block-end: var(--space-4);
    407   }
    408 
    409   .panel-heading svg {
    410     flex: none;
    411     width: var(--space-5);
    412     height: var(--space-5);
    413   }
    414 
    415   .panel-heading h2 {
    416     margin: 0;
    417   }
    418 
    419   /* account mockup: device surface rows inside panels */
    420   .surface-row {
    421     display: grid;
    422     grid-template-columns: var(--space-6) minmax(0, 1fr);
    423     align-items: center;
    424     gap: var(--space-4);
    425     padding: var(--space-4) var(--space-3);
    426     background: var(--line);
    427   }
    428 
    429   .surface-row svg {
    430     width: var(--space-5);
    431     height: var(--space-5);
    432   }
    433 
    434   .surface-title {
    435     display: block;
    436     font-size: var(--font-md);
    437     font-weight: 500;
    438     line-height: var(--lh-snug);
    439   }
    440 
    441   .surface-meta {
    442     display: block;
    443     color: var(--muted);
    444     font-size: var(--font-sm);
    445     line-height: var(--lh-snug);
    446   }
    447 
    448   .surface-state {
    449     grid-column: 2;
    450   }
    451 
    452   @media (min-width: 40em) {
    453     .summary-row,
    454     .surface-row {
    455       grid-template-columns: var(--space-6) minmax(0, 1fr) auto;
    456     }
    457 
    458     .summary-arrow {
    459       display: inline;
    460     }
    461 
    462     .surface-state {
    463       grid-column: 3;
    464     }
    465   }
    466 
    467   /* dropdown mockup: filler that makes the dialog scroll in the demo */
    468   .modal-spacer {
    469     min-height: 8rem;
    470   }
    471 }