@rogieking/figui3
Version:
A lightweight web components library for building Figma plugin and widget UIs with native look and feel
117 lines (101 loc) • 2.19 kB
CSS
html,
:host {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
color: var(--figma-color-text);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: var(--font-family);
font-size: 16px;
font-weight: var(--body-medium-fontWeight);
letter-spacing: var(--body-letter-spacing);
background-color: var(--figma-color-bg);
}
body,
:host {
font-size: var(--body-medium-fontSize);
letter-spacing: var(--body-letter-spacing);
}
h1,
h2 {
font-weight: var(--body-large-strong-fontWeight);
font-size: var(--body-large-fontSize);
}
h3 {
font-weight: var(--body-medium-strong-fontWeight);
font-size: var(--body-medium-fontSize);
}
hr {
height: 1px;
border: none;
width: 100%;
background-color: var(--figma-color-border);
margin: var(--spacer-2) 0;
&[vertical] {
height: 100%;
width: 1px;
margin: 0 var(--spacer-2);
}
}
iframe{
border: 0;
background-color: transparent;
margin: 0;
width: max-content;
height: max-content;
max-width: 100%;
max-height: 100%;
width: 100%;
flex: 1 1 auto;
display: block;
min-height: 0;
}
*,
*:before,
*:after {
box-sizing: border-box;
}
::selection {
background-color: var(--figma-color-text-selection);
}
::-moz-selection {
background-color: var(--figma-color-text-selection);
}
/* helper classes/defaults */
::-webkit-scrollbar {
width: var(--spacer-1);
/* Width of the vertical scrollbar */
height: var(--spacer-1);
/* Height of the horizontal scrollbar */
}
::-webkit-scrollbar-thumb {
background-color: var(--figma-color-bg-tertiary);
border-radius: calc(var(--spacer-1) / 2);
}
::-webkit-scrollbar-thumb:hover {
background-color: var(--figma-color-bg-secondary);
}
/* For Firefox */
* {
scrollbar-width: thin;
scrollbar-color: var(--figma-color-bg-tertiary)
var(--figma-color-bg-secondary);
}
.subtle {
color: var(--figma-color-text-tertiary);
}
/* Defaults */
p {
margin: var(--spacer-2) 0;
line-height: 1rem;
color: var(--figma-color-text-secondary);
}
label {
color: var(--figma-color-text-secondary);
}
h2 {
font-weight: var(--body-medium-strong-fontWeight);
margin: var(--spacer-2) 0;
}