Files
payload/packages/ui/src/fields/Array/index.scss
Paul 7c62e2a327 feat(ui)!: scope all payload css to payload-default layer (#8545)
All payload css is now encapsulated inside CSS layers under `@layer
payload-default`

Any custom css will now have the highest possible specificity.
We have also provided a new layer `@layer payload` if you want to use
layers and ensure that your styles are applied after payload.

To override existing styles in a way that the existing rules of
specificity would be respected you can use the default layer like so
```css
@layer payload-default {
  // my styles within the payload specificity
}
```
2024-10-04 13:02:56 -06:00

108 lines
2.0 KiB
SCSS

@import '../../scss/styles.scss';
@layer payload-default {
.array-field {
display: flex;
flex-direction: column;
gap: calc(var(--base) / 2);
&__header {
display: flex;
flex-direction: column;
gap: calc(var(--base) / 2);
&__header-content {
display: flex;
flex-direction: column;
gap: calc(var(--base) / 4);
}
}
&--has-no-error {
> .array-field__header .array-field__header-content {
color: var(--theme-text);
}
}
&__header-content {
display: flex;
align-items: center;
gap: base(0.5);
}
&__header-wrap {
display: flex;
align-items: flex-end;
width: 100%;
justify-content: space-between;
}
&__header-actions {
list-style: none;
margin: 0;
padding: 0;
display: flex;
color: var(--theme-elevation-800);
}
&__header-action {
@extend %btn-reset;
cursor: pointer;
margin-left: base(0.5);
&:hover,
&:focus-visible {
text-decoration: underline;
color: var(--theme-elevation-600);
}
}
&__row-header {
display: flex;
align-items: center;
gap: base(0.5);
pointer-events: none;
}
&__draggable-rows {
display: flex;
flex-direction: column;
gap: calc(var(--base) / 2);
}
&__title {
margin-bottom: 0;
}
&__add-row {
align-self: flex-start;
color: var(--theme-elevation-400);
margin: 2px 0;
&:hover {
color: var(--theme-elevation-800);
}
}
}
html[data-theme='light'] {
.array-field {
&--has-error {
> .array-field__header .array-field__header-content {
color: var(--theme-error-750);
}
}
}
}
html[data-theme='dark'] {
.array-field {
&--has-error {
> .array-field__header .array-field__header-content {
color: var(--theme-error-500);
}
}
}
}
}