More updates

This commit is contained in:
2024-07-12 23:35:29 -04:00
parent c10125b41d
commit ef9b937d2e
36 changed files with 1311 additions and 12020 deletions

View File

@@ -1,248 +0,0 @@
@mixin color-samples {
#copystatus {
left: 50%;
position: absolute;
z-index: 100;
div {
border-radius: 1rem;
border: 1px solid green;
left: -50%;
padding: 1rem;
position: relative;
white-space: nowrap;
&::after {
clear: both;
content: " ";
display: block;
}
&.succeeded {
background-color: white;
border-color: black;
color: black;
}
&.failed {
background-color: white;
border-color: #f00;
color: #f00;
}
}
}
color-samples {
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: 1rem;
margin-bottom: 1rem;
@include break(-lg) {
display: grid;
grid-template-columns: repeat(2, 1fr);
max-width: 100%;
width: 100%;
}
@include break(-sm) {
grid-template-columns: auto;
width: 100%;
max-width: 100%;
}
color-sample {
align-items: center;
border-radius: .5rem;
border: 1px solid #CCC;
display: grid;
font-family: inherit;
gap: .5rem;
grid-template-areas: "name name name hex hex hex"
"name name name rgb rgb rgb"
"acc acc acc acc acc acc"
"lighter lighter lighter darker darker darker"
"notes notes notes notes notes notes";
grid-template-columns: repeat(6, 1fr);
grid-template-rows: repeat(2, 1.5rem) 10rem repeat(3, max-content); // 3rem repeat(2, 2rem) 1.5rem repeat(3, max-content);
padding: 1rem;
width: 20rem;
max-width: 318px;
@include break(-lg) {
width: 100%;
max-width: 100%;
}
name {
align-self: start;
font-size: 1.25rem;
grid-area: name;
span {
cursor: pointer;
}
}
rgb {
grid-area: rgb;
white-space: nowrap;
}
hex {
grid-area: hex;
white-space: nowrap;
}
> accessibility {
border-bottom: 1px solid #ccc;
border-top: 1px solid #ccc;
}
accessibility {
grid-area: acc;
grid-row: 3;
padding: .5rem 0;
display: grid;
gap: .5rem;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: 2.5rem repeat(2, max-content);
.result {
align-items: center;
border-radius: .5rem;
display: grid;
grid-template-columns: repeat(2, 1fr);
border: 1px solid #ccc;
padding: 0 1rem;
text-align: center;
&.accwaa, &.accwaaa {
background-color: white;
color: black;
}
&.accbaa, &.accbaaa {
background-color: black;
color: white;
}
span:nth-child(2) {
font-size: 2rem;
}
}
.aa, .aaa {
align-self: center;
display: block;
font-size: .75rem;
}
.acchb {
grid-column: 2;
}
.acchb, .acchw {
display: grid;
grid-tempate-columns: auto;
grid-template-rows: repeat(2, max-content);
align-self: start;
text-align: center;
padding: 0;
span {
grid-row: 1;
grid-column: 1 / -1;
font-size: .9rem;
}
small {
text-align: center;
grid-row: 2;
grid-column: 1 / -1;
font-size: .75rem;
}
}
}
sample-block {
align-self: start;
grid-column: span 3;
grid-row: 4;
color-pill {
display: grid;
grid-gap: .5rem;
grid-template-columns: 20px max-content auto;
:nth-child(1) {
align-self: center;
border-radius: 5px;
border: 1px solid #CCC;
display: inline-block;
height: 10px;
width: 20px;
}
span {
cursor: pointer;
.tooltip-tc {
padding: .5rem;
width: 20rem;
max-width: 318px;
height: 10.5rem;
display: grid;
gap: .5rem;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(3, max-content);
.result {
align-items: center;
border-radius: .5rem;
display: grid;
grid-template-columns: repeat(2, 1fr);
border: 1px solid #ccc;
padding: 0 1rem;
text-align: center;
&.accwaa, &.accwaaa {
background-color: white;
color: black;
}
&.accbaa, &.accbaaa {
background-color: black;
color: white;
}
span{ border: none;
&:nth-child(2) {
font-size: 2rem;
}
}
}
.aa, .aaa {
align-self: center;
display: block;
font-size: .75rem;
}
.acchb {
grid-column: 2;
}
.acchb, .acchw {
border: none;
display: block;
width: 100%;
place-self: stretch;
span {
border: none;
font-size: .9rem;
width: 100%;
&::after, &::before {
display: none;
}
}
small {
font-size: .75rem;
text-align: center;
}
}
}
}
}
}
notes {
border-top: 1px solid #ccc;
grid-column: 1 / -1;
padding-top: .5rem;
}
}
}
}

View File

@@ -1,68 +1,316 @@
// This file is geneated by ../pg/_config.pug. Please make your changes there so they are not overwritten
// DS2 core (c) 2024 Alexander McIlwraith
// Licensed under CC BY-SA 4.0
$colors: (
color-blue: #2e51a1,
color-blue-l: #5c7abf,
color-blue-xl: #b2c3ec,
color-blue-d: #133176,
color-blue-xd: #031235,
color-oj: #f0b031,
color-oj-l: #ffcc67,
color-oj-xl: #ffe4ad,
color-oj-d: #cb8906,
color-oj-xd: #9d6900,
/* Core Code
color-raspberry: #da2c5b,
color-raspberry-l: #ed5e85,
color-raspberry-xl: #f9a4bb,
color-raspberry-d: #9f0c34,
color-raspberry-xd: #400011,
This file is generates _core.scss using information in ../pg/_config.pug.
Please make your changes in your _config.pug file so that they are not
overwritten.
*/
color-lime: #cde92f,
color-lime-l: #e2f963,
color-lime-xl: #effca6,
color-lime-d: #9bb40b,
color-lime-xd: #607100,
color-grey: #7f7f7f,
color-grey-l: #b2b2b2,
color-grey-xl: #d8d8d8,
color-grey-xxl: #f0f0f0,
color-white: #fff,
color-page: #fff,
color-light: #fff,
color-grey-d: #4c4c4c,
color-grey-xd: #4c4c4c,
color-black: #000,
color-dark: #000,
@mixin core-colour-samples {
color-error: #a00109,
color-error-text: #fff,
#copystatus {
left: 50%;
position: absolute;
z-index: 100;
div {
border-radius: 1rem;
border: 1px solid green;
left: -50%;
padding: 1rem;
position: relative;
white-space: nowrap;
&::after {
clear: both;
content: " ";
display: block;
}
&.succeeded {
background-color: white;
border-color: black;
color: black;
}
&.failed {
background-color: white;
border-color: #f00;
color: #f00;
}
}
}
color-warn: #a38301,
color-warn-text: #fff,
color-samples {
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: 1rem;
margin-bottom: 1rem;
color-notify: #599601,
color-notify-text: #fff,
@include break(-lg) {
display: grid;
grid-template-columns: repeat(2, 1fr);
max-width: 100%;
width: 100%;
}
color-info: #b2c3ec,
color-info-text: #000,
@include break(-sm) {
grid-template-columns: auto;
width: 100%;
max-width: 100%;
}
color-sample {
align-items: center;
border-radius: .5rem;
border: 1px solid #CCC;
display: grid;
font-family: inherit;
gap: .5rem;
grid-template-areas: "name name name hex hex hex"
"name name name rgb rgb rgb"
"acc acc acc acc acc acc"
"lighter lighter lighter darker darker darker"
"notes notes notes notes notes notes";
grid-template-columns: repeat(6, 1fr);
grid-template-rows: repeat(2, 1.5rem) 10rem repeat(3, max-content); // 3rem repeat(2, 2rem) 1.5rem repeat(3, max-content);
padding: 1rem;
width: 20rem;
max-width: 318px;
@include break(-lg) {
width: 100%;
max-width: 100%;
}
name {
align-self: start;
font-size: 1.25rem;
grid-area: name;
span {
cursor: pointer;
}
}
rgb {
grid-area: rgb;
white-space: nowrap;
}
hex {
grid-area: hex;
white-space: nowrap;
}
> accessibility {
border-bottom: 1px solid #ccc;
border-top: 1px solid #ccc;
}
accessibility {
grid-area: acc;
grid-row: 3;
padding: .5rem 0;
display: grid;
gap: .5rem;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: 2.5rem repeat(2, max-content);
.result {
align-items: center;
border-radius: .5rem;
display: grid;
grid-template-columns: repeat(2, 1fr);
border: 1px solid #ccc;
padding: 0 1rem;
text-align: center;
&.accwaa, &.accwaaa {
background-color: white;
color: black;
}
&.accbaa, &.accbaaa {
background-color: black;
color: white;
}
span:nth-child(2) {
font-size: 2rem;
}
}
.aa, .aaa {
align-self: center;
display: block;
font-size: .75rem;
}
.acchb {
grid-column: 2;
}
.acchb, .acchw {
display: grid;
grid-tempate-columns: auto;
grid-template-rows: repeat(2, max-content);
align-self: start;
text-align: center;
padding: 0;
span {
grid-row: 1;
grid-column: 1 / -1;
font-size: .9rem;
}
small {
text-align: center;
grid-row: 2;
grid-column: 1 / -1;
font-size: .75rem;
}
}
}
sample-block {
align-self: start;
grid-column: span 3;
grid-row: 4;
color-pill {
display: grid;
grid-gap: .5rem;
grid-template-columns: 20px max-content auto;
:nth-child(1) {
align-self: center;
border-radius: 5px;
border: 1px solid #CCC;
display: inline-block;
height: 10px;
width: 20px;
}
span {
cursor: pointer;
.tooltip-tc {
padding: .5rem;
width: 20rem;
max-width: 318px;
height: 10.5rem;
display: grid;
gap: .5rem;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(3, max-content);
.result {
align-items: center;
border-radius: .5rem;
display: grid;
grid-template-columns: repeat(2, 1fr);
border: 1px solid #ccc;
padding: 0 1rem;
text-align: center;
&.accwaa, &.accwaaa {
background-color: white;
color: black;
}
&.accbaa, &.accbaaa {
background-color: black;
color: white;
}
span{ border: none;
&:nth-child(2) {
font-size: 2rem;
}
}
}
.aa, .aaa {
align-self: center;
display: block;
font-size: .75rem;
}
.acchb {
grid-column: 2;
}
.acchb, .acchw {
border: none;
display: block;
width: 100%;
place-self: stretch;
span {
border: none;
font-size: .9rem;
width: 100%;
&::after, &::before {
display: none;
}
}
small {
font-size: .75rem;
text-align: center;
}
}
}
}
}
}
notes {
border-top: 1px solid #ccc;
grid-column: 1 / -1;
padding-top: .5rem;
}
}
}
}
//colour tokens
$colour: (
colour-blue: #2e51a1,
colour-blue-l: #5c7abf,
colour-blue-xl: #b2c3ec,
colour-blue-d: #133176,
colour-blue-xd: #031235,
colour-grey: #7f7f7f,
colour-grey-l: #b2b2b2,
colour-grey-xl: #d8d8d8,
colour-grey-xxl: #f0f0f0,
colour-white: #fff,
colour-page: #fff,
colour-light: #fff,
colour-grey-d: #4c4c4c,
colour-grey-xd: #4c4c4c,
colour-black: #000,
colour-dark: #000,
);
:root {
@each $name, $color in $colors {
@each $name, $color in $colour {
--#{$name}: #{$color};
}
}
@import "color-samples";
// Statuses
$statuses: (
"not-started": transparent,
"another-status": red,
"in-progress": var(--color-oj),
"complete": var(--color-lime),
"needs-review": var(--color-oj-xd),
"deprecated": var(--color-raspberry),
);
"in-progress": #f0b031,
"complete": #2e51a1,
"deprecated": #da2c5b,
);
h1[class^="status"], h2[class^="status"], span[class^="status"] {
&::after {
$size: 1.5rem;
border-radius: 50%;
border: 1px solid #CCC;
content: " ";
display: inline-block;
height: $size;
margin-left: .5rem;
position: relative;
top: 2px;
width: $size;
}
}
@each $name, $color in $statuses {
.status-#{$name}::after {
background-color: $color;
}
}
//! / Core Code

View File

@@ -12,12 +12,11 @@ $tooltip-dark-allow: false;
@use 'sass:math';
@import "core";
// We recommend explicitly using the underscore when referring to pattern scss
// as you may have also created a version that compiles to css to display in
// your pattern.
@import "color-samples";
@import "core";
@import "../pg/patterns/components/sticky-note-core/_sticky-note";
@import "../pg/patterns/components/tooltip-core/_tooltip";
@@ -27,8 +26,6 @@ $tooltip-dark-allow: false;
@import "../pg/patterns/layouts/header-core/_header";
@import "../pg/patterns/layouts/tabs-core/_tabs";
@import "../pg/patterns/status-core/_status";
* {
@@ -43,10 +40,11 @@ html {
}
}
@include status;
@include color-samples;
@include core-colour-samples;
@include tooltip;
@include sticky-note;
@include status;
body {
margin: 0;
@@ -56,10 +54,8 @@ body {
left: -9999px;
}
.container {
display: grid;
grid-template-columns: auto repeat(2, 22rem) auto;
margin: 0 auto;
@@ -67,20 +63,21 @@ body {
@include header;
nav {
background-color: var(--color-blue);
background-color: var(--colour-blue);
grid-column: 2 / 4;
display: none;
ul {
margin: 1rem 0;
li {
display: inline-block;
margin-right: 1rem;
}
}
a {
color: white;
color: var(--colour-white);
text-decoration: none;
}
@include break(md-) {
@@ -90,32 +87,22 @@ body {
p.deprecated-switch {
grid-row: 3;
// @include break(-md) {
// grid-row: 2;
// grid-column: 2 / 4;
// }
grid-column: 2 / 4;
grid-row: 3;
text-align: right;
// align-items: center;
// display: grid;
// grid-gap: .5rem;
// grid-template-columns: auto max-content max-content;
// grid-area: dp;
// margin: 1rem .25rem;
@include switch;
}
main {
display: block;
grid-column: 1 / -1;
grid-row: 4;
padding: 0 1rem;
@include break(-md) {
grid-row: 3;
padding: 0;
}
display: block;
padding: 0 1rem;
// grid-area: main;
grid-column: 1 / -1;
@supports(grid-area: auto) {
display: grid;
@@ -131,8 +118,8 @@ body {
article {
grid-column: 2 / 4;
min-width: 0;
margin-top: 2rem;
min-width: 0;
&.status-deprecated {
display: none;