Skip to content

Commit

Permalink
Merge pull request summernote#3255 from summernote/fix-styles
Browse files Browse the repository at this point in the history
Fix omitted styles and match lines between less and scss
  • Loading branch information
hackerwins authored May 28, 2019
2 parents fa19afb + f0c2a3f commit 402e7b3
Show file tree
Hide file tree
Showing 4 changed files with 180 additions and 159 deletions.
73 changes: 36 additions & 37 deletions src/less/summernote-bs4.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
@import "elements.less";

/* Theme Variables
------------------------------------------*/
------------------------------------------ */
@border-color: #a9a9a9;
@background-color: #f5f5f5;

@img-margin-left: 10px;
@img-margin-right: 10px;

/* Layout
------------------------------------------*/
------------------------------------------ */
.note-editor {
position: relative;

/* dropzone */
// dropzone
@dropzone-color: lightskyblue;
@dropzone-active-color: darken(@dropzone-color, 30);
.note-dropzone {
Expand Down Expand Up @@ -55,24 +55,24 @@
sub {
vertical-align: sub;
}
}

img.note-float-left {
margin-right: @img-margin-right;
}
img.note-float-left {
margin-right: @img-margin-right;
}

img.note-float-right {
margin-left: @img-margin-left;
img.note-float-right {
margin-left: @img-margin-left;
}
}
}
}

/* Frame mode layout
------------------------------------------*/
------------------------------------------ */
.note-editor.note-frame {
border: 1px solid @border-color;

/* codeview mode */
// codeview mode
&.codeview {
.note-editing-area {
.note-editable {
Expand All @@ -87,7 +87,7 @@
.note-editing-area {
overflow: hidden;

/* editable */
// editable
.note-editable {
background-color: #fff;
color: #000;
Expand All @@ -100,7 +100,7 @@
}
}

/* codeable */
// codeable
.note-codable {
display: none;
width: 100%;
Expand All @@ -114,20 +114,20 @@
resize: none;
outline: none;

/* override BS2 default style */
// override BS2 default style
.box-sizing(border-box);
.rounded(0);
margin-bottom: 0;
}
}

/* fullscreen mode */
// fullscreen mode
&.fullscreen {
position: fixed;
top: 0;
left: 0;
width: 100% !important;
z-index: 1050; /* bs3 modal-backdrop: 1030, bs2: 1040 */
z-index: 1050; // bs3 modal-backdrop: 1030, bs2: 1040
.note-editable {
background-color: #fff;
}
Expand All @@ -136,7 +136,7 @@
}
}

/* Notifications */
// Notifications
.note-status-output {
display: block;
width: 100%;
Expand Down Expand Up @@ -214,7 +214,7 @@
background-color: #f2dede !important;
}

/* statusbar */
// statusbar
.note-statusbar {
background-color: @background-color;
border-bottom-left-radius: 4px;
Expand Down Expand Up @@ -247,7 +247,7 @@
}

/* Popover
------------------------------------------*/
------------------------------------------ */
.note-popover.popover {
display: none;
max-width: none;
Expand All @@ -257,8 +257,8 @@
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap; /* for FF */
vertical-align: middle; /* for FF */
white-space: nowrap; // for FF
vertical-align: middle; // for FF
}
}
.arrow {
Expand All @@ -267,7 +267,7 @@
}

/* Popover and Toolbar (Button container)
------------------------------------------*/
------------------------------------------ */
.note-toolbar {
z-index: 500;
position: relative;
Expand Down Expand Up @@ -315,7 +315,7 @@
}
}

.note-style {
.note-style {
.dropdown-style {
blockquote, pre {
margin: 0;
Expand Down Expand Up @@ -396,19 +396,19 @@
}
}

/* dropdown-menu for toolbar and popover */
// dropdown-menu for toolbar and popover
.dropdown-menu {
min-width: 90px;

/* dropdown-menu right position */
/* http://forrst.com/posts/Bootstrap_right_positioned_dropdown-2KB */
// dropdown-menu right position
// http://forrst.com/posts/Bootstrap_right_positioned_dropdown-2KB
&.right {
right: 0;
left: auto;
&::before { right: 9px; left: auto !important; }
&::after { right: 10px; left: auto !important; }
}
/* dropdown-menu for selectbox */
// dropdown-menu for selectbox
&.note-check {
a i {
color: deepskyblue;
Expand All @@ -418,14 +418,13 @@
visibility: visible;
}
}

}

.note-fontsize-10 {
font-size: 10px;
}

/* color palette for toolbar and popover */
// color palette for toolbar and popover
.note-color-palette {
line-height: 1;
div {
Expand All @@ -444,23 +443,23 @@
}

/* Dialog
------------------------------------------*/
------------------------------------------ */
.note-dialog {
&>div {
display: none; /* BS2's hide pacth. */
display: none; // BS2's hide pacth.
}
.form-group { /* overwrite BS's form-horizontal minus margins */
.form-group { // overwrite BS's form-horizontal minus margins
margin-left: 0;
margin-right: 0;
}
.note-modal-form {
margin: 0; /* overwrite BS2's form margin bottom */
margin: 0; // overwrite BS2's form margin bottom
}
.note-image-dialog {
.note-dropzone {
min-height: 100px;
font-size: 30px;
line-height: 4; /* vertical-align */
line-height: 4; // vertical-align
color: lightgray;
text-align: center;
border: 4px dashed lightgray;
Expand All @@ -477,17 +476,17 @@
}

/* Placeholder
------------------------------------------*/
------------------------------------------ */
.note-placeholder {
position: absolute;
display: none;
color: gray;
}

/* Handle
------------------------------------------*/
------------------------------------------ */
.note-handle {
/* control selection */
// control selection
.note-control-selection {
position: absolute;
display: none;
Expand Down
Loading

0 comments on commit 402e7b3

Please sign in to comment.