Skip to content

Commit

Permalink
refactor(text-editor): no need to be so specific for default styles
Browse files Browse the repository at this point in the history
We were adding specificity of "if not `readonly`" then these
are the colors. But further down, we actually specified colors for the
readonly mode. So this was an overkill. Also would complicate styles
for next commit, for the `disabled` state.
  • Loading branch information
Kiarokh committed May 17, 2024
1 parent 56f241f commit 9d2206c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/components/text-editor/text-editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
}

:host(limel-text-editor) {
--limel-text-editor-outline-color: #{shared_input-select-picker.$lime-text-field-outline-color};
--limel-text-editor-background-color: #{shared_input-select-picker.$background-color-normal};
--limel-text-editor-label-color: #{shared_input-select-picker.$label-color};
--limel-text-editor-padding: 0.75rem 1rem;
position: relative;
isolation: isolate;
Expand All @@ -24,12 +27,6 @@
max-height: 100%;
}

:host(limel-text-editor:not([readonly])) {
--limel-text-editor-outline-color: #{shared_input-select-picker.$lime-text-field-outline-color};
--limel-text-editor-background-color: #{shared_input-select-picker.$background-color-normal};
--limel-text-editor-label-color: #{shared_input-select-picker.$label-color};
}

:host(limel-text-editor:hover) {
--limel-text-editor-outline-color: #{shared_input-select-picker.$lime-text-field-outline-color--hovered};
}
Expand Down

0 comments on commit 9d2206c

Please sign in to comment.