react-md-editor
Version:
React Markdown Editor
95 lines (70 loc) • 1.48 kB
text/less
/**
* Markdown Editor
*/
@button-gutter: 4px;
.MDEditor_editor {
border: 1px solid #ccc;
border-radius: 4px;
overflow: hidden;
position: relative;
}
.MDEditor_toolbar {
margin-bottom: @button-gutter;
margin-top: @button-gutter;
}
.MDEditor_toolbarButton {
background: #eee;
border: 1px solid transparent;
border-radius: 4px;
cursor: pointer;
display: inline-block;
margin-right: @button-gutter;
padding: 10px 0;
text-align: center;
vertical-align: middle;
width: 40px;
// transitions
transition: all 180ms;
-webkit-transition: all 180ms;
&:hover,
&:focus {
background-color: white;
border-color: rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
outline: none;
transition: none;
-webkit-transition: none;
}
}
.MDEditor_toolbarButton:active,
.MDEditor_toolbarButton--pressed {
background-color: rgba(0, 0, 0, 0.15);
border-color: rgba(0, 0, 0, 0.1);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
&:hover {
background: rgba(0, 0, 0, 0.2);
}
}
// Button Icons
.MDEditor_toolbarButton_icon {
display: inline-block;
height: 16px;
width: 16px;
> svg {
height: 16px;
width: 16px;
}
}
// hide the label when there's an icon
.MDEditor_toolbarButton_label {
display: none;
}
// can't find decent icons for headings so just use text
.MDEditor_toolbarButton_label-icon {
display: inline-block;
font-size: 16px;
font-weight: bold;
line-height: .9;
height: 16px;
text-transform: uppercase;
}