Skip to content

Commit

Permalink
feat(editor): add find and replace dialog styles
Browse files Browse the repository at this point in the history
  • Loading branch information
silviyaboteva authored and joneff committed Sep 3, 2020
1 parent 923bc83 commit 4676a4d
Show file tree
Hide file tree
Showing 8 changed files with 131 additions and 1 deletion.
7 changes: 7 additions & 0 deletions packages/bootstrap/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2950,6 +2950,13 @@ $editor-line-height: $line-height !default;
$editor-placeholder-text: $input-placeholder-text !default;
$editor-placeholder-opacity: $input-placeholder-opacity !default;

$editor-selected-text: $primary-contrast !default;
$editor-selected-bg: $primary !default;

$editor-highlighted-bg: mix($primary, #ffffff, 20%) !default;

$editor-find-line-bg: $secondary;


// Gantt
$gantt-border-width: 1px !default;
Expand Down
6 changes: 6 additions & 0 deletions packages/classic/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2912,6 +2912,12 @@ $editor-line-height: $line-height !default;
$editor-placeholder-text: $input-placeholder-text !default;
$editor-placeholder-opacity: $input-placeholder-opacity !default;

$editor-selected-text: $primary-contrast !default;
$editor-selected-bg: $primary !default;

$editor-highlighted-bg: mix($primary, #ffffff, 20%) !default;

$editor-find-line-bg: $secondary;

// Gantt
$gantt-border-width: 1px !default;
Expand Down
7 changes: 7 additions & 0 deletions packages/default/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2968,6 +2968,13 @@ $editor-line-height: $line-height !default;
$editor-placeholder-text: $input-placeholder-text !default;
$editor-placeholder-opacity: $input-placeholder-opacity !default;

$editor-selected-text: $primary-contrast !default;
$editor-selected-bg: $primary !default;

$editor-highlighted-bg: mix($primary, #ffffff, 20%) !default;

$editor-find-line-bg: $secondary;


// Gantt
$gantt-border-width: 1px !default;
Expand Down
40 changes: 39 additions & 1 deletion packages/default/scss/editor/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,48 @@
border-width: 0;
}
}
}

// Find and replace dialog
.k-editor-find-replace {
.k-content {
position: relative;
}

.k-edit-form-container {
display: inline-block;

.k-edit-label {
text-align: left;
}
}

.k-action-buttons {
padding: 0;
}

.k-search-options {
display: flex;
flex-direction: column;
padding: 10px 0 40px 0;

> span {
padding-bottom: $padding-y;
}
}

.k-matches-container {
position: absolute;
bottom: 0;
left: 0;
right: 0;
padding: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
}
}

@include exports( "editor/dialog/layout" ) {

Expand Down
29 changes: 29 additions & 0 deletions packages/default/scss/editor/_theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,33 @@
}
}

// Content
.k-editor-content {

// Selection
.k-text-selected,
&::selection {
@include fill (
$color: $editor-selected-text,
$bg: $editor-selected-bg
);
}

.k-text-highlighted {
@include fill (
$bg: $editor-highlighted-bg
);
}
}

// Find and replace dialog
.k-editor-find-replace {
.k-matches-container {
@include fill (
$bg: $editor-find-line-bg
);
}

}

}
7 changes: 7 additions & 0 deletions packages/material/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3007,6 +3007,13 @@ $editor-line-height: $line-height !default;
$editor-placeholder-text: $input-placeholder-text !default;
$editor-placeholder-opacity: $input-placeholder-opacity !default;

$editor-selected-text: $primary-contrast !default;
$editor-selected-bg: $primary !default;

$editor-highlighted-bg: mix($primary, #ffffff, 20%) !default;

$editor-find-line-bg: transparent;

// Gantt
$gantt-border-width: 1px !default;
$gantt-font-family: $font-family !default;
Expand Down
7 changes: 7 additions & 0 deletions packages/material/scss/editor/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
line-height: $line-height;
}
}

// Find and replace dialog
.k-editor-find-replace {
.k-matches-container {
text-transform: uppercase;
}
}
}


Expand Down
29 changes: 29 additions & 0 deletions packages/material/scss/editor/_theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,33 @@
@include fill( $selected-text, $selected-bg, $selected-border, none );
}
}

// Content
.k-editor-content {

// Selection
.k-text-selected,
&::selection {
@include fill (
$color: $editor-selected-text,
$bg: $editor-selected-bg
);
}

.k-text-highlighted {
@include fill (
$bg: $editor-highlighted-bg
);
}
}

// Find and replace dialog
.k-editor-find-replace {
.k-matches-container {
@include fill (
$bg: $editor-find-line-bg
);
}

}
}

0 comments on commit 4676a4d

Please sign in to comment.