Mailspring/app/static/style/components/button-dropdown.less

184 lines
4.2 KiB
Text
Raw Normal View History

@import '../buttons';
.button-dropdown {
position: relative;
display: inline-block;
&.open {
.secondary-items {
visibility: inherit;
}
}
&.open.open-up {
.secondary-items {
border-radius: @border-radius-base @border-radius-base 0 @border-radius-base;
box-shadow: 0 0.5px 0 @standard-shadow-color, 0 -0.5px 0 @standard-shadow-color,
0.5px 0 0 @standard-shadow-color, -0.5px 0 0 @standard-shadow-color,
0 -3px 12px @standard-shadow-color;
top: -100%;
transform: translate(0, -6px);
}
.secondary-picker {
border-top-right-radius: 0;
}
}
&.open.open-down {
.secondary-items {
border-radius: @border-radius-base 0 @border-radius-base @border-radius-base;
box-shadow: 0 0.5px 0 @standard-shadow-color, 0 -0.5px 0 @standard-shadow-color,
0.5px 0 0 @standard-shadow-color, -0.5px 0 0 @standard-shadow-color,
0 5px 12px @standard-shadow-color;
transform: translate(0, 1.5px);
}
.secondary-picker {
border-bottom-right-radius: 0;
}
}
&.btn-emphasis {
.primary-item,
.secondary-picker,
.only-item {
.btn.btn-emphasis();
}
.primary-item {
border-right: 0;
}
}
.primary-item,
.only-item {
.btn();
cursor: default;
color: @btn-default-text-color;
}
.primary-item {
border-radius: @border-radius-base 0 0 @border-radius-base;
}
.secondary-picker {
.btn();
box-shadow: @standard-shadow-color 0 0.5px 0, @standard-shadow-color 0 -0.5px 0,
@standard-shadow-color 0.5px 0 0, @standard-shadow-color 0 0.5px 1px;
border-radius: 0 @border-radius-base @border-radius-base 0;
border-left: 0;
padding: 0 6px;
}
.secondary-items {
&:hover {
cursor: default;
}
&.left {
width: auto;
left: -1px;
right: auto;
white-space: nowrap;
}
Totally overhauled composer based on Slate (#524) * Remove the composer contenteditable, replace with basic <textarea> * Beginning broader cleanup of draft session * DraftJS composer with color, style support * Serialization/unserialization of basic styles, toolbar working * WIP * Switch to draft-js-plugins approach, need to revisit HTML * Move HTML conversion functionality into plugins * Add spellcheck context menu to editor * Initial work on quoted text * Further work on quoted text * BLOCK approach * Entity approach - better, does not bump out to top level * Hiding and showing quoted text via CSS * Get rid of ability to inject another subject line component * Clean up specs, DraftFactory to ES6 * Remove old initial focus hack * Fix focusing, initial text selection * Remove participant “collapsing” support, it can be confusing * Correctly terminate links on carriage returns * Initial signature support, allow removal of uneditable blocks * Sync body string with body editorstate * Simplify draft editor session, finish signatures * Templates * Minor fixes * Simplify link/open tracking, ensure it works * Reorg composer, rework template editor * Omg the slowness is all the stupid emoji button * Polish and small fixes * Performance improvements, new templates UI * Don’t assume nodes are elements * Fix for sending drafts twice due to back-to-back saves * Fix order of operations on app quit to save drafts reliably * Improve DraftJS-Convert whitespace handling * Use contentID throughout attachment lifecycle * Try to fix images * Switch to Slate instead of DraftJS… much better * Fix newline handling * Bug fixes * Cleanup * Finish templates plugin * Clean up text editing / support for Gmail email styles * Support for color + size on the same node, clean trailing whitespace * Restore emoji typeahead / emoji picker * Fix scrolling in template editor * Fix specs * Fix newlines * Re-implement spellcheck to be faster * Make spellcheck decorator changes invisible to the undo/redo stack * Remove comment * Polish themplates panel * Fix #521
2018-01-12 07:55:56 +08:00
z-index: 3;
background-color: @background-secondary;
position: absolute;
2016-02-19 07:49:45 +08:00
right: 0;
white-space: nowrap;
visibility: hidden;
.menu {
.footer-container,
.header-container {
display: none;
}
.content-container {
background: transparent;
margin-top: 0;
}
.item {
font-size: 13px;
padding: 4px 11px;
&:first-child {
padding-top: 6px;
}
&:last-child {
padding-bottom: 6px;
}
img {
margin-right: 4px;
vertical-align: text-bottom;
}
&.selected {
background-color: inherit;
color: @text-color;
}
}
.item:first-child {
border-top-left-radius: @border-radius-base;
}
.item:last-child {
border-bottom-left-radius: @border-radius-base;
border-bottom-right-radius: @border-radius-base;
}
.item:hover {
background-color: darken(@background-secondary, 3%);
color: inherit;
}
}
}
img {
background-color: @text-color;
}
}
body.platform-win32 {
.button-dropdown {
.primary-item {
.windows-btn-bg;
.windows-btn-border;
border-radius: 0;
position: relative;
left: -1px;
}
.secondary-picker {
.windows-btn-bg;
.windows-btn-border;
position: relative;
right: -1px;
}
.secondary-picker,
.secondary-items {
border-radius: 0;
}
&.btn-emphasis {
.primary-item,
.secondary-picker,
.only-item {
border: 0;
background: @btn-emphasis-bg-color;
&:hover {
border-radius: 0;
background: darken(@btn-emphasis-bg-color, 10%);
}
&:active {
background: @btn-emphasis-bg-color;
}
}
.primary-item {
box-shadow: -1px 0 0 2px @btn-emphasis-bg-color;
&:hover {
box-shadow: -1px 0 0 2px darken(@btn-emphasis-bg-color, 10%);
}
}
.secondary-picker {
box-shadow: 1px 0 0 2px @btn-emphasis-bg-color;
&:hover {
box-shadow: 1px 0 0 2px darken(@btn-emphasis-bg-color, 10%);
}
}
.only-item {
box-shadow: 0 0 0 2px @btn-emphasis-bg-color;
&:hover {
box-shadow: 0 0 0 2px darken(@btn-emphasis-bg-color, 10%);
}
}
}
}
}