mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-24 14:34:09 +00:00
feat(wikitable): ✨ use box-shadow instead of border hacks to build table border
This commit is contained in:
parent
c2523b141c
commit
442c272cab
|
@ -9,9 +9,6 @@
|
|||
* Base theme
|
||||
*/
|
||||
:root {
|
||||
--box-shadow-card: @box-shadow-card;
|
||||
--box-shadow-dialog: @box-shadow-dialog;
|
||||
|
||||
--font-grade: 0;
|
||||
|
||||
/* Foreground Colors */
|
||||
|
|
|
@ -14,9 +14,10 @@
|
|||
margin: var( --space-md ) 0;
|
||||
overflow-x: auto;
|
||||
font-size: var( --font-size-small );
|
||||
border-spacing: 0;
|
||||
border: 1px solid var( --border-color-base );
|
||||
border-collapse: collapse;
|
||||
border-color: var( --border-color-base );
|
||||
border-radius: var( --border-radius-medium );
|
||||
box-shadow: var( --box-shadow-border );
|
||||
|
||||
caption {
|
||||
padding-right: var( --space-sm );
|
||||
|
|
|
@ -34,6 +34,14 @@
|
|||
--background-color-icon: ~'rgba( 0, 0, 0, var( --opacity-icon-base ) )';
|
||||
--background-color-icon--hover: ~'rgba( 0, 0, 0, var( --opacity-icon-base--hover ) )';
|
||||
--background-color-icon--active: ~'rgba( 0, 0, 0, var( --opacity-icon-base--active ) )';
|
||||
/* Box shadow */
|
||||
--box-shadow-border: var( --border-color-base ) 0 0 0 1px inset;
|
||||
// Based on https://web.dev/building-a-color-scheme/#rad-shadow
|
||||
// TODO: Refactor this to support filter drop-shadow
|
||||
--box-shadow-card:
|
||||
0 2.8px 2.2px -4px ~'hsla( var(--surface-shadow), calc(var(--shadow-strength) + .03) )',0 6.7px 5.3px -4px ~'hsla( var(--surface-shadow), calc(var(--shadow-strength) + .01) )',0 12.5px 10px -4px ~'hsla( var(--surface-shadow), calc(var(--shadow-strength) + .02) )',0 22.3px 17.9px -4px ~'hsla( var(--surface-shadow), calc(var(--shadow-strength) + .02) )',0 41.8px 33.4px -4px ~'hsla( var(--surface-shadow), calc(var(--shadow-strength) + .03) )',0 100px 80px -4px ~'hsla( var(--surface-shadow), var(--shadow-strength) )';
|
||||
--box-shadow-dialog:
|
||||
0 2.8px 2.2px ~'hsla( var(--surface-shadow), calc(var(--shadow-strength) + .03) )',0 6.7px 5.3px ~'hsla (var(--surface-shadow), calc(var(--shadow-strength) + .01) )',0 12.5px 10px ~'hsla( (--surface-shadow), calc(var(--shadow-strength) + .02) )',0 22.3px 17.9px ~'hsla( var(--surface-shadow), calc(var(--shadow-strength) + .02) )',0 41.8px 33.4px ~'hsla( var(--surface-shadow), calc(var(--shadow-strength) + .03) )',0 100px 80px ~'hsla( var(--surface-shadow), var(--shadow-strength) )';
|
||||
/* Font */
|
||||
// Used as base unit to caluclate font-size
|
||||
--font-size-base: 1rem;
|
||||
|
|
|
@ -109,13 +109,6 @@
|
|||
@transition-hover: 150ms cubic-bezier( 0.215, 0.61, 0.355, 1 );
|
||||
@transition-menu: 250ms cubic-bezier( 0.4, 0, 0.2, 1 );
|
||||
|
||||
/* Shadow */
|
||||
/* Box shadow */
|
||||
// Based on https://web.dev/building-a-color-scheme/#rad-shadow
|
||||
// TODO: Refactor this to support filter drop-shadow
|
||||
@box-shadow-card: 0 2.8px 2.2px -4px ~'hsla(var(--surface-shadow), calc(var(--shadow-strength) + .03))', 0 6.7px 5.3px -4px ~'hsla(var(--surface-shadow), calc(var(--shadow-strength) + .01))', 0 12.5px 10px -4px ~'hsla(var(--surface-shadow), calc(var(--shadow-strength) + .02))', 0 22.3px 17.9px -4px ~'hsla(var(--surface-shadow), calc(var(--shadow-strength) + .02))', 0 41.8px 33.4px -4px ~'hsla(var(--surface-shadow), calc(var(--shadow-strength) + .03))', 0 100px 80px -4px ~'hsla(var(--surface-shadow), var(--shadow-strength))';
|
||||
@box-shadow-dialog: 0 2.8px 2.2px ~'hsla(var(--surface-shadow), calc(var(--shadow-strength) + .03))', 0 6.7px 5.3px ~'hsla(var(--surface-shadow), calc(var(--shadow-strength) + .01))', 0 12.5px 10px ~'hsla(var(--surface-shadow), calc(var(--shadow-strength) + .02))', 0 22.3px 17.9px ~'hsla(var(--surface-shadow), calc(var(--shadow-strength) + .02))', 0 41.8px 33.4px ~'hsla(var(--surface-shadow), calc(var(--shadow-strength) + .03))', 0 100px 80px ~'hsla(var(--surface-shadow), var(--shadow-strength))';
|
||||
|
||||
/*
|
||||
* Framework
|
||||
*/
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
display: block;
|
||||
max-width: none;
|
||||
line-height: var( --line-height-sm );
|
||||
border: 0;
|
||||
box-shadow: none;
|
||||
|
||||
tbody {
|
||||
display: grid;
|
||||
|
|
Loading…
Reference in a new issue