motto/src/app/[...file]/components/copy.css.ts

88 lines
1.6 KiB
TypeScript
Raw Normal View History

import { style } from '@vanilla-extract/css';
2024-09-19 05:34:28 +01:00
import * as colors from '../../colors.css';
export const copy = style({
2024-09-23 07:02:42 +00:00
display: 'flex',
alignItems: 'center',
width: 'max-content',
backgroundColor: colors.background,
});
export const copy_button = style({
display: 'flex',
margin: 0,
border: 'none',
padding: 0,
outline: 'inherit',
fontFamily: 'monospace',
fontSize: '1.1em',
lineHeight: '2em',
color: 'inherit',
whiteSpace: 'pre-wrap',
transition: 'background-color 0.35s',
background: 'none',
width: 'max-content',
height: '100%',
':hover': {
2024-09-23 07:02:42 +00:00
backgroundColor: colors.background2,
},
});
const copy_image = style({
boxSizing: 'border-box',
border: `1px solid ${colors.background2}`,
padding: '0.75em',
width: 'auto',
height: '100%',
selectors: {
[`${copy}:hover &`]: {
},
},
});
export const copy_image_dark = style([copy_image, {
display: 'block',
'@media': {
'(prefers-color-scheme: light)': {
display: 'none',
},
},
2024-09-23 07:02:42 +00:00
}]);
export const copy_image_light = style([copy_image, {
display: 'none',
'@media': {
'(prefers-color-scheme: light)': {
display: 'block',
},
},
}]);
export const copied_image_dark = style([copy_image, {
display: 'block',
'@media': {
'(prefers-color-scheme: light)': {
display: 'none',
},
},
}]);
export const copied_image_light = style([copy_image, {
display: 'none',
'@media': {
'(prefers-color-scheme: light)': {
display: 'block',
},
},
}]);
export const copy_text = style({
2024-09-23 19:16:08 +00:00
margin: 0,
2024-09-23 07:02:42 +00:00
marginLeft: '1em',
2024-09-23 19:16:08 +00:00
width: 'max-content',
fontFamily: 'monospace',
fontSize: '1.2em',
});