Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add medium-editor style

dominik-zeglen1fa05ffc8ffe
diff --git a/saleor/static/dashboard/scss/components/_medium-editor.scss b/saleor/static/dashboard/scss/components/_medium-editor.scss
new file mode 100644
index 0000000000..1bfbcabfa7
--- /dev/null
+++ b/saleor/static/dashboard/scss/components/_medium-editor.scss
@@ -0,0 +1,116 @@
+.medium {
+ &-toolbar {
+ &-arrow {
+ &-under:after {
+ border-color: $medium-editor-bgcolor transparent transparent transparent;
+ top: $medium-editor-button-size;
+ }
+ &-over:before {
+ border-color: transparent transparent $medium-editor-bgcolor transparent;
+ }
+ }
+ }
+
+ &-editor {
+ &-anchor-preview {
+ a {
+ color: $medium-editor-link-color;
+ text-decoration: none;
+ }
+ }
+
+ &-element {
+ outline: none;
+ border-bottom: 1px $grey-color solid;
+ transition: all $transition-duration;
+ padding-bottom: 1rem;
+ &:focus, &:active {
+ border-bottom-color: $secondary-color;
+ box-shadow: 0 1px 0 0 $secondary-color;
+ }
+ }
+
+ &-toolbar {
+ background-color: $medium-editor-bgcolor;
+ border: none;
+ border-radius: $medium-editor-border-radius;
+
+ li {
+ button {
+ background-color: transparent;
+ border: none;
+ box-sizing: border-box;
+ color: $medium-editor-link-color;
+ height: $medium-editor-button-size;
+ min-width: $medium-editor-button-size;
+ padding: 5px 12px;
+ transition: background-color .2s ease-in, color .2s ease-in;
+ &:hover {
+ background-color: $medium-editor-hover-color;
+ color: $medium-editor-button-active-text-color;
+ }
+ }
+ }
+
+ &-close {
+ margin-right: 16px;
+ }
+
+ &-form {
+ background: $medium-editor-bgcolor;
+ border-radius: $medium-editor-border-radius;
+ color: $medium-editor-link-color;
+ overflow: hidden;
+ a {
+ color: $medium-editor-link-color;
+ transform: translateY(2px);
+ }
+ }
+
+ &-input {
+ background: $medium-editor-bgcolor;
+ box-sizing: border-box;
+ color: $medium-editor-link-color;
+ height: $medium-editor-button-size;
+ padding-left: 16px;
+ width: 220px;
+
+ &::placeholder {
+ color: rgba($medium-editor-placeholder-color, .8);
+ }
+ }
+
+ &-actions {
+ li, button {
+ border-radius: $medium-editor-border-radius;
+ }
+ }
+
+ &-anchor-preview {
+ background: $medium-editor-bgcolor;
+ border-radius: $medium-editor-border-radius;
+ padding: 5px 12px;
+ }
+ }
+
+ &-button {
+ &-first {
+ border-bottom-left-radius: $medium-editor-border-radius;
+ border-top-left-radius: $medium-editor-border-radius;
+ padding-left: 24px;
+ }
+
+ &-last {
+ border-bottom-right-radius: $medium-editor-border-radius;
+ border-right: none;
+ border-top-right-radius: $medium-editor-border-radius;
+ padding-right: 24px
+ }
+
+ &-active {
+ background-color: $medium-editor-hover-color;
+ color: $medium-editor-button-active-text-color;
+ }
+ }
+ }
+}
diff --git a/saleor/static/dashboard/scss/dashboard.scss b/saleor/static/dashboard/scss/dashboard.scss
index 6436b42d58..7685a64520 100644
--- a/saleor/static/dashboard/scss/dashboard.scss
+++ b/saleor/static/dashboard/scss/dashboard.scss
@@ -14,6 +14,7 @@
@import "components/form";
@import "components/formset";
@import "components/list";
+@import "components/medium-editor";
@import "components/nav";
@import "components/pagination";
@import "components/modals";