@oslokommune/punkt-css
Version:
CSS-rammeverket til Punkt, et designsystem laget av Oslo Origo
157 lines (155 loc) • 3.4 kB
CSS
.pkt-preview {
position: relative;
}
.pkt-preview .pkt-tabs {
--pkt-tabs-bg: var(--pkt-color-surface-default-gray);
}
.pkt-preview__component {
position: relative;
display: flex;
justify-content: space-around;
align-items: center;
min-height: 10rem;
padding: 3rem 1rem;
margin: 0;
background-color: var(--pkt-color-background-default);
transition: background-color 0.2s linear;
}
.pkt-preview__component--fullwidth > div {
width: 100%;
}
.pkt-preview__component-container {
border: 2px solid var(--pkt-color-border-gray);
display: flex;
flex-direction: column;
gap: 0;
}
@media screen and (min-width: 64rem) {
.pkt-preview__component-container {
flex-direction: row;
}
.pkt-preview__component-container .pkt-preview__component {
flex: 1 1 0;
min-width: 0;
}
.pkt-preview__component-container .pkt-preview__panel {
flex: 0 0 auto;
min-width: 20rem;
max-width: 25rem;
width: 100%;
}
}
.pkt-preview__panel {
display: flex;
flex-direction: column;
gap: 1rem;
padding: 2rem 1.5rem;
justify-content: space-between;
align-items: stretch;
background-color: var(--pkt-color-surface-default-gray);
}
.pkt-preview__panel__options {
display: flex;
flex-direction: column;
gap: 1rem;
margin-bottom: 1rem;
}
.pkt-preview__options {
display: flex;
flex-direction: column;
gap: 1rem;
}
.pkt-preview__opts {
padding: 1rem;
background-color: var(--pkt-color-surface-default-gray);
}
.pkt-preview__opts > .pkt-cell {
position: relative;
}
.pkt-preview__opts > .pkt-cell > .pkt-tag {
display: block;
position: absolute;
top: 0;
right: 0;
padding: 0 0.25rem 0;
}
.pkt-preview .hide-code-button {
position: absolute;
top: 100%;
margin-top: -1.5rem;
left: 0;
width: 100%;
display: flex;
justify-content: center;
align-items: flex-end;
padding-bottom: 1rem;
z-index: 2;
}
.pkt-preview__code {
color: var(--pkt-color-text-body-default);
position: relative;
}
.pkt-preview__code-container {
position: relative;
padding: 2rem 2rem 0;
background-color: var(--pkt-color-grays-gray-800);
transition: max-height 0.5s ease;
max-height: 50rem;
}
.pkt-preview__code-container .pkt-tabs {
--pkt-tabs-bg: var(--pkt-color-grays-gray-800);
}
.pkt-preview__code-container.hide-code {
overflow: hidden;
max-height: 11.7rem;
}
.pkt-preview__code-container.hide-code:after {
content: "";
display: block;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: linear-gradient(180deg, transparent 0%, transparent 93%, var(--pkt-color-grays-gray-800) 100%);
}
.pkt-preview__code pre {
max-height: 30rem;
overflow: auto;
margin-top: 0 ;
background-color: transparent ;
font-size: 1rem;
padding: 2rem 0;
}
.pkt-preview__copy {
position: absolute;
top: 0.5rem;
right: 0.5rem;
display: flex;
gap: 0.5rem;
align-items: center;
}
.pkt-preview__array-item, .pkt-preview__object-editor {
position: relative;
display: flex;
flex-direction: column;
gap: 1rem;
}
.pkt-preview__add-object {
text-align: right;
margin-top: 0.5rem;
}
.pkt-preview__remove-object {
position: absolute;
top: -2rem;
right: -0.25rem;
}
.pkt-preview__specs pre {
margin-top: 0 ;
}
.astro-code.github-light {
background-color: var(--pkt-color-surface-default-gray) ;
}
.preview-content {
display: contents;
}