ConceptPortal-public/rsconcept/frontend/src/styling/setup.css

183 lines
2.7 KiB
CSS
Raw Normal View History

/**
* Module: Basic styling setup.
*/
@import './constants.css';
@tailwind base;
@tailwind components;
@tailwind utilities;
2024-10-23 23:22:55 +03:00
*,
*::after,
*::before {
box-sizing: border-box;
/* Uncomment to debug layering and overflow */
/* background: hsla(135, 50%, 50%, 0.05); */
/* outline: 2px solid hotpink; */
}
2024-10-03 16:26:12 +03:00
html {
-webkit-text-size-adjust: none;
-moz-text-size-adjust: none;
text-size-adjust: none;
hanging-punctuation: first last;
color-scheme: dark light;
interpolate-size: allow-keywords;
2024-10-03 16:26:12 +03:00
}
2024-06-08 21:44:44 +03:00
2024-10-03 16:26:12 +03:00
body {
2024-02-22 11:35:27 +03:00
margin: 0px;
padding: 0px;
overflow-x: hidden;
}
[data-color-scheme='dark'] {
color-scheme: dark;
}
[data-color-scheme='light'] {
color-scheme: light;
}
/* Default scroll behavior */
@media (prefers-reduced-motion: no-preference) {
:has(:target) {
scroll-behavior: smooth;
2024-10-03 16:26:12 +03:00
scroll-padding-top: var(--scroll-padding);
}
}
:root {
2024-10-23 23:22:55 +03:00
interpolate-size: allow-keywords;
2024-10-03 16:26:12 +03:00
font-size: var(--font-size-base);
line-height: var(--line-height);
font-family: var(--font-main);
color: var(--clr-app-999);
border-color: var(--clr-app-400);
background-color: var(--clr-app-100);
}
2024-05-07 16:20:10 +03:00
@media only screen and (max-width: 639px) {
2024-01-16 13:47:29 +03:00
:root {
2024-10-03 16:26:12 +03:00
font-size: var(--font-size-sm);
2024-01-16 13:47:29 +03:00
}
}
2024-05-12 13:58:28 +03:00
:focus,
:focus-visible,
:focus-within {
outline-width: 2px;
outline-style: solid;
outline-color: transparent;
2024-05-11 20:53:36 +03:00
}
::selection {
background: var(--clr-prim-800);
tr :hover& {
background: var(--clr-warn-100);
}
}
::placeholder {
color: var(--clr-app-600);
}
/* Wrapping headers */
h1,
h2,
h3,
h4,
h5,
h6 {
text-wrap: balance;
}
/* Limit text lines and setup wrapping */
p,
li {
2024-10-03 16:26:12 +03:00
max-width: var(--text-max-width);
text-wrap: pretty;
}
div:not(.dense) > p:not(:last-child) {
margin-bottom: 0.5rem;
2024-02-22 16:25:11 +03:00
}
@layer components {
h1 {
font-weight: 600;
font-size: 1.125rem;
line-height: 1.75rem;
text-align: center;
}
h2 {
font-weight: 600;
text-align: center;
&:not(:first-child) {
:not([role='manuals']) & {
margin-top: 0.5rem;
}
[role='manuals'] & {
margin-top: 0.75rem;
margin-bottom: 0.5rem;
}
2024-10-03 16:26:12 +03:00
}
}
b {
font-weight: 600;
}
2024-05-17 15:48:54 +03:00
code {
font-family: var(--font-math);
}
2024-05-11 20:53:36 +03:00
li {
list-style-position: inside;
}
2024-05-07 17:58:36 +03:00
li::marker {
2024-08-22 15:30:01 +03:00
content: '\2009';
2024-05-07 17:58:36 +03:00
}
.border {
border-radius: 0.25rem;
}
2024-09-12 11:17:01 +03:00
.border,
.border-x,
.border-y,
.border-b,
.border-t,
.border-l,
.border-r,
.border-2,
.border-x-2,
.border-y-2,
.border-b-2,
.border-t-2,
.border-l-2,
.border-r-2,
.divide-x,
.divide-y,
.divide-x-2,
.divide-y-2 {
border-color: var(--clr-app-400);
& > :not([hidden]) ~ :not([hidden]) {
border-color: inherit;
2024-09-12 11:17:01 +03:00
}
}
.sticky {
z-index: 20;
}
}