standard-ui/components/css/main.css
2021-07-14 22:51:44 +05:30

639 lines
9.5 KiB
CSS

* {
padding: 0;
margin: 0;
box-sizing: border-box;
font-family: "Roboto", sans-serif;
}
:root {
font-size: clamp(1rem, 1.2vmax, 3rem);
}
html, body {
height: 100%;
scroll-behavior: smooth;
}
body {
--accent-color: #4d2588;
--text-color: 17, 17, 17;
--background-color: 255, 255, 255;
--danger-color: red;
color: rgba(var(--text-color), 1);
background: rgba(var(--background-color), 1);
/* string - green */
/* keyword - dark pink */
/* comment - gray */
/* type - light blue */
/* literal */
/* html/xml tag */
/* html/xml attribute name */
/* html/xml attribute value*/
/* decimal - blue */
}
body pre .str, body code .str {
color: #65B042;
}
body pre .kwd, body code .kwd {
color: #E28964;
}
body pre .com, body code .com {
color: #AEAEAE;
font-style: italic;
}
body pre .typ, body code .typ {
color: #4395ff;
}
body pre .lit, body code .lit {
color: #1a76c2;
}
body pre .tag, body code .tag {
color: #1976D2;
}
body pre .atn, body code .atn {
color: #00C853;
}
body pre .atv, body code .atv {
color: #F57F17;
}
body pre .dec, body code .dec {
color: #3387CC;
}
body[data-theme=dark] {
/* html/xml tag */
/* html/xml attribute name */
/* html/xml attribute value*/
}
body[data-theme=dark],
body[data-theme=dark] * {
--accent-color: #976dd6;
--text-color: 240, 240, 240;
--text-color-light: 170, 170, 170;
--background-color: 20, 20, 20;
--danger-color: rgb(255, 106, 106);
}
body[data-theme=dark] pre .tag, body[data-theme=dark] code .tag {
color: #29B6F6;
}
body[data-theme=dark] pre .atn, body[data-theme=dark] code .atn {
color: #1DE9B6;
}
body[data-theme=dark] pre .atv, body[data-theme=dark] code .atv {
color: #84FFFF;
}
p {
font-size: 0.8;
max-width: 65ch;
line-height: 1.7;
margin-bottom: 1.5rem;
color: rgba(var(--text-color), 0.8);
}
p:not(:last-of-type) {
margin-bottom: 1rem;
}
img {
object-fit: cover;
}
a {
color: inherit;
text-decoration: none;
}
a:focus-visible {
box-shadow: 0 0 0 0.1rem rgba(var(--text-color), 1) inset;
}
button {
display: inline-flex;
border: none;
background-color: inherit;
}
a:any-link:focus-visible {
outline: rgba(var(--text-color), 1) 0.1rem solid;
}
sm-button {
--border-radius: 0.3rem;
}
ul {
list-style: none;
}
table {
position: relative;
text-align: left;
border-radius: 0.5rem;
border-collapse: separate;
border-spacing: 1rem 1.5rem;
background-color: rgba(var(--text-color), 0.04);
margin: 1rem 0;
}
table p:only-of-type {
margin-bottom: 0;
}
table td {
line-height: 1.7;
max-width: 65ch;
}
.flex {
display: flex;
}
.grid {
display: grid;
}
.hide {
opacity: 0;
pointer-events: none;
}
.hide-completely {
display: none !important;
}
.no-transformations {
transform: none !important;
}
.overflow-ellipsis {
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.breakable {
overflow-wrap: break-word;
word-wrap: break-word;
-ms-word-break: break-all;
word-break: break-word;
-ms-hyphens: auto;
-moz-hyphens: auto;
-webkit-hyphens: auto;
hyphens: auto;
}
.full-bleed {
grid-column: 1/4;
}
.h1 {
font-size: 2.5rem;
}
.h2 {
font-size: 2rem;
}
.h3 {
font-size: 1.4rem;
}
.h4 {
font-size: 1rem;
}
.h5 {
font-size: 0.8rem;
}
.uppercase {
text-transform: uppercase;
}
.capitalize {
text-transform: capitalize;
}
.flex {
display: flex;
}
.grid {
display: grid;
}
.grid-3 {
grid-template-columns: 1fr auto auto;
}
.flow-column {
grid-auto-flow: column;
}
.gap-0-5 {
gap: 0.5rem;
}
.gap-1 {
gap: 1rem;
}
.gap-1-5 {
gap: 1.5rem;
}
.gap-2 {
gap: 2rem;
}
.gap-3 {
gap: 3rem;
}
.text-align-right {
text-align: right;
}
.align-start {
align-items: flex-start;
}
.align-center {
align-items: center;
}
.text-center {
text-align: center;
}
.justify-start {
justify-content: start;
}
.justify-center {
justify-content: center;
}
.justify-right {
margin-left: auto;
}
.align-self-center {
align-self: center;
}
.justify-self-center {
justify-self: center;
}
.justify-self-start {
justify-self: start;
}
.justify-self-end {
justify-self: end;
}
.direction-column {
flex-direction: column;
}
.space-between {
justify-content: space-between;
}
.w-100 {
width: 100%;
}
.color-0-8 {
color: rgba(var(--text-color), 0.8);
}
.weight-400 {
font-weight: 400;
}
.weight-500 {
font-weight: 500;
}
.ripple {
position: absolute;
border-radius: 50%;
transform: scale(0);
background: rgba(var(--text-color), 0.16);
pointer-events: none;
}
.interact {
position: relative;
overflow: hidden;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.observe-empty-state:empty {
display: none;
}
.observe-empty-state:not(:empty) ~ .empty-state {
display: none;
}
.icon {
width: 1.5rem;
height: 1.5rem;
fill: rgba(var(--text-color), 0.9);
}
.button__icon {
height: 1.2rem;
width: 1.2rem;
}
.button__icon--left {
margin-right: 0.5rem;
}
.button__icon--right {
margin-left: 0.5rem;
}
.theme-switcher {
position: relative;
justify-self: flex-end;
width: 1.5rem;
height: 1.5rem;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.theme-switcher .icon {
position: absolute;
transition: transform 0.6s;
}
.theme-switcher__checkbox {
display: none;
}
.theme-switcher__checkbox:checked ~ .moon-icon {
transform: scale(0) rotate(90deg);
}
.theme-switcher__checkbox:not(:checked) ~ .sun-icon {
transform: scale(0) rotate(-90deg);
}
pre .pun, code .pun {
color: rgba(var(--text-color), 0.8);
}
/* punctuation */
pre .pln, code .pln {
color: rgba(var(--text-color), 0.8);
}
/* plaintext */
pre {
max-width: 100%;
margin: 1rem 0;
padding: 0 1.5rem;
overflow-x: auto;
font-size: 0.9rem;
font-weight: 500;
white-space: pre-line;
border-radius: 0.5rem;
background: rgba(var(--text-color), 0.04);
line-height: 1.7;
}
code {
border-radius: 0.3rem;
font-weight: 400;
padding: 0.2rem 0.4rem;
background: rgba(var(--text-color), 0.1);
}
code > * {
font-family: "Roboto Mono", monospace;
}
pre code {
line-height: 1.4;
border-radius: none;
background: none;
width: 100%;
}
h1, h2, h3, h4.h5 {
font-family: "Poppins", sans-serif;
}
h2 {
margin: 3rem 0 1rem 0;
text-transform: capitalize;
}
h2:first-of-type {
margin-top: 1rem;
}
main {
display: grid;
height: 100%;
}
#main_header {
padding: 0.5rem 1.5rem;
border-bottom: 1px solid rgba(var(--text-color), 0.1);
}
#side_nav_button {
padding: 0.5rem;
margin-left: -0.5rem;
}
#backdrop {
position: fixed;
z-index: 4;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
}
.right {
max-height: 100%;
overflow-y: auto;
}
#side_nav > :last-child {
padding-bottom: 3rem;
}
#side_nav h4 {
font-size: 0.9rem;
letter-spacing: 0.08em;
text-transform: uppercase;
padding: 1.5rem;
}
.right {
padding: 1.5rem;
}
.right h1 {
margin-bottom: 1.5rem;
}
.list {
list-style: none;
display: flex;
flex-direction: column;
margin-bottom: 0.8rem;
}
.list__item {
display: flex;
padding: 0.8rem 1.5rem;
text-transform: capitalize;
}
.list__item--active {
color: var(--accent-color);
background: rgba(var(--text-color), 0.06);
}
.card {
display: flex;
flex-direction: column;
margin-right: 1rem;
border-radius: 0.4rem;
padding: 1.5rem;
min-width: min(24rem, 80%);
background-color: rgba(var(--text-color), 0.06);
}
sm-carousel {
margin-bottom: 1rem;
}
sm-tab-header {
margin-bottom: 1.5rem;
}
.page {
display: flex;
flex-direction: column;
padding-bottom: 3rem;
}
ol {
padding: 0.6rem 1rem;
max-width: 75ch;
margin-bottom: 3rem;
}
ol li {
margin-bottom: 1rem;
}
ol li:last-of-type {
margin-bottom: 0;
}
ol li::first-letter {
text-transform: capitalize;
}
strong {
max-width: 65ch;
}
strong.important {
display: flex;
padding: 0.5rem;
margin: 0.5rem 0;
border-radius: 0.3rem;
color: rgba(0, 0, 0, 0.8);
background-color: khaki;
}
.highlight {
display: inline-flex;
font-family: "Roboto Mono", monospace;
background-color: rgba(var(--text-color), 0.1);
border-radius: 0.3rem;
padding: 0 0.5rem;
font-size: 0.9rem;
}
#total_components_count {
font-size: 4rem;
}
#components_selection_list {
display: grid;
gap: 1.5rem;
grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
padding: 1.5rem 0 3rem 0;
}
.comp-checkbox__title {
margin-left: 0.5rem;
}
@media screen and (max-width: 640px) {
main {
grid-template-rows: auto 1fr;
grid-template-columns: 1fr;
}
}
@media screen and (min-width: 640px) {
#main_header {
padding: 1rem 1.5rem;
grid-area: main-header;
}
#side_nav_button {
display: none;
}
main {
grid-template-columns: 14rem minmax(0, 1fr);
grid-template-areas: "main-header main-header" ". .";
}
.right {
display: grid;
grid-template-columns: 1fr 90% 1fr;
}
.right > * {
grid-column: 2/3;
}
.page__title {
font-size: 2.5rem;
}
#overview_page {
display: grid;
gap: 1.5rem;
grid-template-columns: 1fr auto;
}
#overview_page > div:first-of-type {
grid-column: 2/3;
text-align: right;
}
#overview_page > div:nth-of-type(2) {
grid-row: 1/2;
}
}
@media (any-hover: hover) {
::-webkit-scrollbar {
width: 0.5rem;
height: 0.5rem;
}
::-webkit-scrollbar-thumb {
background: rgba(var(--text-color), 0.3);
border-radius: 1rem;
}
::-webkit-scrollbar-thumb:hover {
background: rgba(var(--text-color), 0.5);
}
.list__item:hover {
background: rgba(var(--text-color), 0.1);
cursor: pointer;
}
}