0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 13:43:03 -05:00
penpot-exporter-figma-plugin/ui-src/main.css
Alex Sánchez c013e80962
Custom Fonts (#82)
* wip

* moved logic to validate custom fonts

* missing fonts section

* lint

* refactor and improve

* simplify resize

* refactor

* Implemente custom fonts

* styling plugin

* styling plugin

* minor styling fix

* changeset

* fix

* fix eslint

---------

Co-authored-by: Jordi Sala Morales <jordism91@gmail.com>
2024-05-03 13:43:07 +02:00

176 lines
3.3 KiB
CSS

:root {
--color-bg: var(--figma-color-bg);
--color-bg-hover: var(--figma-color-bg-hover);
--color-bg-active: var(--figma-color-bg-pressed);
--color-border: var(--figma-color-border);
--color-border-focus: var(--figma-color-border-selected);
--color-icon: var(--figma-color-icon);
--color-text: var(--figma-color-text);
--color-bg-brand: var(--figma-color-bg-brand);
--color-bg-brand-hover: var(--figma-color-bg-brand-hover);
--color-bg-brand-active: var(--figma-color-bg-brand-pressed);
--color-border-brand: var(--figma-color-border-brand);
--color-border-brand-focus: var(--figma-color-border-selected-strong);
--color-text-brand: var(--figma-color-text-onbrand);
}
html,
body,
main {
height: 100%;
}
body,
input,
button {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,
'Open Sans', 'Helvetica Neue', sans-serif;
font-size: 1rem;
text-align: center;
}
body {
background: var(--color-bg);
color: var(--color-text);
margin: 0;
}
button {
border-radius: 0.25rem;
background: var(--color-bg);
color: var(--color-text);
cursor: pointer;
border: 1px solid var(--color-border);
padding: 0.5rem 1rem;
}
button:hover {
background-color: var(--color-bg-hover);
}
button:active {
background-color: var(--color-bg-active);
}
button:focus-visible {
border: none;
outline-color: var(--color-border-focus);
}
button:disabled {
background-color: black;
color: var(--color-text);
cursor: not-allowed;
}
button.brand {
--color-bg: var(--color-bg-brand);
--color-text: var(--color-text-brand);
--color-bg-hover: var(--color-bg-brand-hover);
--color-bg-active: var(--color-bg-brand-active);
--color-border: transparent;
--color-border-focus: var(--color-border-brand-focus);
}
input {
background: 1px solid var(--color-bg);
border: 1px solid var(--color-border);
color: 1px solid var(--color-text);
padding: 0.5rem;
}
input:focus-visible {
border-color: var(--color-border-focus);
outline-color: var(--color-border-focus);
}
svg {
stroke: var(--color-icon, rgb(0 0 0 / 90%));
height: auto;
width: 2rem;
}
main {
align-items: center;
display: flex;
flex-direction: column;
justify-content: center;
}
section {
align-items: center;
display: flex;
flex-direction: column;
justify-content: center;
margin-bottom: 1rem;
}
section > * + * {
margin-top: 0.5rem;
}
footer > * + * {
margin-left: 0.5rem;
}
.missing-fonts small {
font-size: 0.5rem;
padding-top: 5px;
padding-bottom: 5px;
}
ul {
padding: 0;
list-style-type: none;
}
.centered-form {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
}
.missing-fonts-form-container {
width: 100%;
margin: 0 auto 10px;
max-height: 300px;
overflow: auto;
}
.missing-fonts-section {
width: 100%;
max-width: 500px;
margin: 0 auto;
}
.missing-fonts-list {
display: flex;
flex-direction: column;
align-items: stretch;
width: 90%;
}
.font-input-row {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 15px;
}
.font-name {
flex: 0 0 auto;
width: 100%;
max-width: 30%;
text-align: center;
white-space: normal;
}
.font-id-input {
flex: 1;
width: 70%;
max-width: 70%;
margin-left: 10px;
padding: 5px;
box-sizing: border-box;
}