mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-28 08:10:45 +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
|
* Base theme
|
||||||
*/
|
*/
|
||||||
:root {
|
:root {
|
||||||
--box-shadow-card: @box-shadow-card;
|
|
||||||
--box-shadow-dialog: @box-shadow-dialog;
|
|
||||||
|
|
||||||
--font-grade: 0;
|
--font-grade: 0;
|
||||||
|
|
||||||
/* Foreground Colors */
|
/* Foreground Colors */
|
||||||
|
|
|
@ -14,9 +14,10 @@
|
||||||
margin: var( --space-md ) 0;
|
margin: var( --space-md ) 0;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
font-size: var( --font-size-small );
|
font-size: var( --font-size-small );
|
||||||
border-spacing: 0;
|
border-collapse: collapse;
|
||||||
border: 1px solid var( --border-color-base );
|
border-color: var( --border-color-base );
|
||||||
border-radius: var( --border-radius-medium );
|
border-radius: var( --border-radius-medium );
|
||||||
|
box-shadow: var( --box-shadow-border );
|
||||||
|
|
||||||
caption {
|
caption {
|
||||||
padding-right: var( --space-sm );
|
padding-right: var( --space-sm );
|
||||||
|
|
|
@ -34,6 +34,14 @@
|
||||||
--background-color-icon: ~'rgba( 0, 0, 0, var( --opacity-icon-base ) )';
|
--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--hover: ~'rgba( 0, 0, 0, var( --opacity-icon-base--hover ) )';
|
||||||
--background-color-icon--active: ~'rgba( 0, 0, 0, var( --opacity-icon-base--active ) )';
|
--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 */
|
/* Font */
|
||||||
// Used as base unit to caluclate font-size
|
// Used as base unit to caluclate font-size
|
||||||
--font-size-base: 1rem;
|
--font-size-base: 1rem;
|
||||||
|
|
|
@ -109,13 +109,6 @@
|
||||||
@transition-hover: 150ms cubic-bezier( 0.215, 0.61, 0.355, 1 );
|
@transition-hover: 150ms cubic-bezier( 0.215, 0.61, 0.355, 1 );
|
||||||
@transition-menu: 250ms cubic-bezier( 0.4, 0, 0.2, 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
|
* Framework
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
display: block;
|
display: block;
|
||||||
max-width: none;
|
max-width: none;
|
||||||
line-height: var( --line-height-sm );
|
line-height: var( --line-height-sm );
|
||||||
border: 0;
|
box-shadow: none;
|
||||||
|
|
||||||
tbody {
|
tbody {
|
||||||
display: grid;
|
display: grid;
|
||||||
|
|
Loading…
Reference in a new issue