Skip to content

Commit

Permalink
Move TextEditor styles to common (#2661)
Browse files Browse the repository at this point in the history
Now that TextEditor js component is shared, it only makes sense to also 
have its styles shared
  • Loading branch information
SychO9 authored Mar 5, 2021
1 parent c81f629 commit 725863a
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 53 deletions.
49 changes: 49 additions & 0 deletions less/common/TextEditor.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
.TextEditor .TextEditor-editor {
border-radius: 0;
padding: 0 0 10px;
border: 0;
resize: none;
color: @text-color;
font-size: 14px;
line-height: 1.7;

&, &:focus, &[disabled] {
background: none;
border: 0;
}

@media @phone {
font-size: 16px; // minimum font-size required to prevent page zoom on focus in iOS 10
}
}
.TextEditor-controls {
margin: 0;
padding: 10px 0;
list-style-type: none;
overflow-x: auto;
white-space: nowrap;

li {
display: inline-block;
margin-right: 10px;
}
}
.TextEditor-toolbar {
.Button--icon {
width: 28px;
}
}

@media @tablet-up {
.TextEditor-controls {
margin: 0 -20px 0 -105px;
padding: 10px 20px;
border-top: 1px solid @control-bg;

.fullScreen & {
margin: 0;
border-top: 0;
padding: 20px 0;
}
}
}
1 change: 1 addition & 0 deletions less/common/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
@import "Placeholder";
@import "Search";
@import "Select";
@import "TextEditor";
@import "Tooltip";
@import "ValidationError";
53 changes: 0 additions & 53 deletions less/forum/Composer.less
Original file line number Diff line number Diff line change
Expand Up @@ -319,56 +319,3 @@
left: @pane-width;
}
}

// ------------------------------------
// Text Editor

.TextEditor .TextEditor-editor {
border-radius: 0;
padding: 0 0 10px;
border: 0;
resize: none;
color: @text-color;
font-size: 14px;
line-height: 1.7;

&, &:focus, &[disabled] {
background: none;
border: 0;
}

@media @phone {
font-size: 16px; // minimum font-size required to prevent page zoom on focus in iOS 10
}
}
.TextEditor-controls {
margin: 0;
padding: 10px 0;
list-style-type: none;
overflow-x: auto;
white-space: nowrap;

li {
display: inline-block;
margin-right: 10px;
}
}
.TextEditor-toolbar {
.Button--icon {
width: 28px;
}
}

@media @tablet-up {
.TextEditor-controls {
margin: 0 -20px 0 -105px;
padding: 10px 20px;
border-top: 1px solid @control-bg;

.fullScreen & {
margin: 0;
border-top: 0;
padding: 20px 0;
}
}
}

0 comments on commit 725863a

Please sign in to comment.