forked from abner/for-legacy-web
Add more internal CSS variables.
This commit is contained in:
@@ -353,13 +353,13 @@ const Base = styled.div<{ detached?: boolean }>`
|
||||
display: flex;
|
||||
font-size: 1em;
|
||||
cursor: pointer;
|
||||
border-radius: 6px;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
font-family: inherit;
|
||||
background: transparent;
|
||||
color: var(--foreground);
|
||||
width: calc(100% - 12px);
|
||||
font-family: inherit;
|
||||
border-radius: var(--border-radius);
|
||||
|
||||
span {
|
||||
display: grid;
|
||||
@@ -377,7 +377,7 @@ const Base = styled.div<{ detached?: boolean }>`
|
||||
bottom: 8px;
|
||||
|
||||
> div {
|
||||
border-radius: 4px;
|
||||
border-radius: var(--border-radius);
|
||||
}
|
||||
`}
|
||||
`;
|
||||
|
||||
@@ -37,8 +37,8 @@ export default styled.div<BaseMessageProps>`
|
||||
props.contrast &&
|
||||
css`
|
||||
padding: 0.3rem;
|
||||
border-radius: 4px;
|
||||
background: var(--hover);
|
||||
border-radius: var(--border-radius);
|
||||
`}
|
||||
|
||||
${(props) =>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.attachment {
|
||||
display: grid;
|
||||
grid-auto-columns: min(100%, 480px);
|
||||
grid-auto-flow: row dense;
|
||||
grid-auto-columns: min(100%, var(--attachment-max-width));
|
||||
|
||||
margin: .125rem 0 .125rem;
|
||||
width: max-content;
|
||||
@@ -16,11 +16,10 @@
|
||||
gap: 4px;
|
||||
padding: 6px;
|
||||
display: flex;
|
||||
border-radius: 6px;
|
||||
flex-direction: column;
|
||||
background: var(--secondary-background);
|
||||
width: 400px;
|
||||
max-width: 100%;
|
||||
flex-direction: column;
|
||||
width: var(--attachment-default-width);
|
||||
background: var(--secondary-background);
|
||||
|
||||
> audio {
|
||||
width: 100%;
|
||||
@@ -29,22 +28,20 @@
|
||||
|
||||
&.file {
|
||||
> div {
|
||||
width: 400px;
|
||||
max-width: 100%;
|
||||
padding: 12px;
|
||||
max-width: 100%;
|
||||
user-select: none;
|
||||
width: fit-content;
|
||||
border-radius: 6px;
|
||||
border-radius: var(--border-radius);
|
||||
width: var(--attachment-default-width);
|
||||
}
|
||||
}
|
||||
|
||||
&.text {
|
||||
width: 100%;
|
||||
max-width: 800px;
|
||||
overflow: hidden;
|
||||
grid-auto-columns: unset;
|
||||
|
||||
border-radius: 6px;
|
||||
max-width: var(--attachment-max-text-width);
|
||||
|
||||
.textContent {
|
||||
height: 140px;
|
||||
@@ -83,10 +80,10 @@
|
||||
width: fit-content;
|
||||
|
||||
> :first-child {
|
||||
width: min(480px, 100%, var(--width));
|
||||
width: min(var(--attachment-max-width), 100%, var(--width));
|
||||
}
|
||||
}
|
||||
|
||||
.container, .attachment, .image {
|
||||
border-radius: 6px;
|
||||
border-radius: var(--border-radius);
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ import { Children } from "../../../../types/Preact";
|
||||
|
||||
const Grid = styled.div`
|
||||
display: grid;
|
||||
max-width: min(480px, 100%, var(--width));
|
||||
max-height: min(640px, var(--height));
|
||||
max-width: min(var(--attachment-max-width), 100%, var(--width));
|
||||
max-height: min(var(--attachment-max-height), var(--height));
|
||||
aspect-ratio: var(--aspect-ratio);
|
||||
|
||||
img, video {
|
||||
|
||||
@@ -68,7 +68,7 @@ const Divider = styled.div`
|
||||
width: 4px;
|
||||
height: 130px;
|
||||
flex-shrink: 0;
|
||||
border-radius: 4px;
|
||||
border-radius: var(--border-radius);
|
||||
background: var(--tertiary-background);
|
||||
`;
|
||||
|
||||
@@ -78,8 +78,8 @@ const EmptyEntry = styled.div`
|
||||
display: grid;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
place-items: center;
|
||||
border-radius: var(--border-radius);
|
||||
background: var(--primary-background);
|
||||
transition: 0.1s ease background-color;
|
||||
|
||||
@@ -93,12 +93,10 @@ const PreviewBox = styled.div`
|
||||
grid-template: "main" 100px / minmax(100px, 1fr);
|
||||
justify-items: center;
|
||||
|
||||
background: var(--primary-background);
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
border-radius: var(--border-radius);
|
||||
background: var(--primary-background);
|
||||
|
||||
.icon,
|
||||
.overlay {
|
||||
|
||||
@@ -17,18 +17,18 @@ const Bar = styled.div`
|
||||
height: 28px;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
border-radius: 4px 4px 0 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
padding: 0 8px;
|
||||
user-select: none;
|
||||
color: var(--secondary-foreground);
|
||||
background: var(--secondary-background);
|
||||
justify-content: space-between;
|
||||
color: var(--secondary-foreground);
|
||||
transition: color ease-in-out 0.08s;
|
||||
|
||||
background: var(--secondary-background);
|
||||
border-radius: var(--border-radius) var(--border-radius) 0 0;
|
||||
|
||||
> div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
iframe {
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
border-radius: var(--border-radius);
|
||||
}
|
||||
|
||||
&.image {
|
||||
@@ -27,8 +27,8 @@
|
||||
|
||||
padding: 12px;
|
||||
width: fit-content;
|
||||
border-radius: 4px;
|
||||
background: var(--primary-header);
|
||||
border-radius: var(--border-radius);
|
||||
|
||||
.siteinfo {
|
||||
display: flex;
|
||||
@@ -91,7 +91,7 @@
|
||||
img.image {
|
||||
cursor: pointer;
|
||||
object-fit: contain;
|
||||
border-radius: 3px;
|
||||
border-radius: var(--border-radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
&[data-type="mention"] {
|
||||
padding: 0 6px;
|
||||
font-weight: 600;
|
||||
border-radius: 12px;
|
||||
display: inline-block;
|
||||
background: var(--secondary-background);
|
||||
border-radius: calc(var(--border-radius) * 2);
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
@@ -61,8 +61,8 @@
|
||||
blockquote {
|
||||
margin: 2px 0;
|
||||
padding: 2px 0;
|
||||
border-radius: 4px;
|
||||
background: var(--hover);
|
||||
border-radius: var(--border-radius);
|
||||
border-inline-start: 4px solid var(--tertiary-background);
|
||||
|
||||
> * {
|
||||
@@ -72,9 +72,8 @@
|
||||
|
||||
pre {
|
||||
padding: 1em;
|
||||
border-radius: 4px;
|
||||
overflow-x: scroll;
|
||||
border-radius: 3px;
|
||||
border-radius: var(--border-radius);
|
||||
background: var(--block) !important;
|
||||
}
|
||||
|
||||
@@ -85,8 +84,8 @@
|
||||
code {
|
||||
color: white;
|
||||
font-size: 90%;
|
||||
border-radius: 4px;
|
||||
background: var(--block);
|
||||
border-radius: var(--border-radius);
|
||||
font-family: var(--monoscape-font), monospace;
|
||||
}
|
||||
|
||||
@@ -113,9 +112,9 @@
|
||||
padding: 0 2px;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
border-radius: 4px;
|
||||
color: transparent;
|
||||
background: #151515;
|
||||
border-radius: var(--border-radius);
|
||||
|
||||
> * {
|
||||
opacity: 0;
|
||||
@@ -137,14 +136,10 @@
|
||||
font-family: var(--monoscape-font), monospace;
|
||||
|
||||
:global(.lang) {
|
||||
// height: 8px;
|
||||
// position: relative;
|
||||
|
||||
width: fit-content;
|
||||
padding-bottom: 8px;
|
||||
|
||||
div {
|
||||
// margin-left: -5px;
|
||||
// margin-top: -16px;
|
||||
// position: absolute;
|
||||
|
||||
color: #111;
|
||||
cursor: pointer;
|
||||
padding: 2px 6px;
|
||||
@@ -163,10 +158,6 @@
|
||||
box-shadow: 0 1px #787676;
|
||||
}
|
||||
}
|
||||
|
||||
// ! FIXME: had to change this temporarily due to overflow
|
||||
width: fit-content;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,10 +178,10 @@
|
||||
font-size: 10px;
|
||||
margin-right: 6px;
|
||||
line-height: 12px;
|
||||
position: relative;
|
||||
border-radius: 4px;
|
||||
background: white;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
border-radius: var(--border-radius);
|
||||
}
|
||||
|
||||
input[type="checkbox"][checked="true"] + label:before {
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
display: flex;
|
||||
padding: 0 8px;
|
||||
user-select: none;
|
||||
border-radius: 6px;
|
||||
margin-bottom: 2px;
|
||||
border-radius: var(--border-radius);
|
||||
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
|
||||
@@ -30,7 +30,7 @@ export default styled.button<Props>`
|
||||
background: var(--primary-background);
|
||||
color: var(--foreground);
|
||||
|
||||
border-radius: 4px;
|
||||
border-radius: var(--border-radius);
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
|
||||
|
||||
@@ -4,12 +4,12 @@ import styled, { css } from "styled-components";
|
||||
import { Children } from "../../types/Preact";
|
||||
|
||||
const CheckboxBase = styled.label`
|
||||
margin-top: 20px;
|
||||
gap: 4px;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
border-radius: 4px;
|
||||
margin-top: 20px;
|
||||
align-items: center;
|
||||
border-radius: var(--border-radius);
|
||||
|
||||
cursor: pointer;
|
||||
font-size: 18px;
|
||||
@@ -57,9 +57,9 @@ const Checkmark = styled.div<{ checked: boolean }>`
|
||||
height: 24px;
|
||||
display: grid;
|
||||
flex-shrink: 0;
|
||||
border-radius: 4px;
|
||||
place-items: center;
|
||||
transition: 0.2s ease all;
|
||||
border-radius: var(--border-radius);
|
||||
background: var(--secondary-background);
|
||||
|
||||
svg {
|
||||
|
||||
@@ -63,7 +63,7 @@ const SwatchesBase = styled.div`
|
||||
const Swatch = styled.div<{ type: "small" | "large"; colour: string }>`
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
border-radius: var(--border-radius);
|
||||
background-color: ${(props) => props.colour};
|
||||
|
||||
display: grid;
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
import styled from "styled-components";
|
||||
|
||||
export default styled.select`
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
border-radius: var(--border-radius);
|
||||
|
||||
font-family: inherit;
|
||||
font-size: var(--text-size);
|
||||
color: var(--secondary-foreground);
|
||||
background: var(--secondary-background);
|
||||
font-size: var(--text-size);
|
||||
|
||||
border: none;
|
||||
outline: 2px solid transparent;
|
||||
transition: outline-color 0.2s ease-in-out;
|
||||
transition: box-shadow 0.2s ease-in-out;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
transition: outline-color 0.2s ease-in-out;
|
||||
|
||||
&:focus {
|
||||
box-shadow: 0 0 0 1.5pt var(--accent);
|
||||
|
||||
@@ -6,9 +6,9 @@ interface Props {
|
||||
|
||||
export default styled.input<Props>`
|
||||
z-index: 1;
|
||||
padding: 8px 16px;
|
||||
border-radius: 6px;
|
||||
font-size: 1rem;
|
||||
padding: 8px 16px;
|
||||
border-radius: var(--border-radius);
|
||||
|
||||
font-family: inherit;
|
||||
color: var(--foreground);
|
||||
|
||||
@@ -60,8 +60,8 @@ const ModalBase = styled.div`
|
||||
|
||||
const ModalContainer = styled.div`
|
||||
overflow: hidden;
|
||||
border-radius: 8px;
|
||||
max-width: calc(100vw - 20px);
|
||||
border-radius: var(--border-radius);
|
||||
|
||||
animation-name: ${zoomIn};
|
||||
animation-duration: 0.25s;
|
||||
@@ -71,8 +71,8 @@ const ModalContainer = styled.div`
|
||||
const ModalContent = styled.div<
|
||||
{ [key in "attachment" | "noBackground" | "border" | "padding"]?: boolean }
|
||||
>`
|
||||
border-radius: 8px;
|
||||
text-overflow: ellipsis;
|
||||
border-radius: var(--border-radius);
|
||||
|
||||
h3 {
|
||||
margin-top: 0;
|
||||
@@ -98,13 +98,13 @@ const ModalContent = styled.div<
|
||||
${(props) =>
|
||||
props.attachment &&
|
||||
css`
|
||||
border-radius: 8px 8px 0 0;
|
||||
border-radius: var(--border-radius) var(--border-radius) 0 0;
|
||||
`}
|
||||
|
||||
${(props) =>
|
||||
props.border &&
|
||||
css`
|
||||
border-radius: 10px;
|
||||
border-radius: var(--border-radius);
|
||||
border: 2px solid var(--secondary-background);
|
||||
`}
|
||||
`;
|
||||
|
||||
@@ -27,8 +27,8 @@ const RadioBase = styled.label<BaseProps>`
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
user-select: none;
|
||||
border-radius: 4px;
|
||||
transition: 0.2s ease all;
|
||||
border-radius: var(--border-radius);
|
||||
|
||||
&:hover {
|
||||
background: var(--hover);
|
||||
|
||||
@@ -30,7 +30,7 @@ export default styled.textarea<TextAreaProps>`
|
||||
${(props) =>
|
||||
!props.hideBorder &&
|
||||
css`
|
||||
border-radius: 4px;
|
||||
border-radius: var(--border-radius);
|
||||
transition: border-color 0.2s ease-in-out;
|
||||
border: var(--input-border-width) solid transparent;
|
||||
`}
|
||||
|
||||
@@ -22,8 +22,8 @@ export const TipBase = styled.div<Props>`
|
||||
align-items: center;
|
||||
|
||||
font-size: 14px;
|
||||
border-radius: 7px;
|
||||
background: var(--primary-header);
|
||||
border-radius: var(--border-radius);
|
||||
border: 2px solid var(--secondary-header);
|
||||
|
||||
a {
|
||||
|
||||
Reference in New Issue
Block a user