Mailspring/static/components/editable-list.less
Juan Tejada f0cc7afb54 fix(editable-list): Prevent empty selection on esc pressed + other fixes
- When prop specified to not allow empty selection it should also
prevent it from being cleared when pressing Esc while focusing the list
- Adds a default value to the edit item input
- Updates specs
- Updates styles
2015-12-14 14:29:45 -08:00

85 lines
1.8 KiB
Plaintext

@import "ui-variables";
.nylas-editable-list {
.items-wrapper {
display: flex;
flex-direction: column;
border: 1px solid @border-secondary-bg;
background-color: @background-primary;
height: 90px;
font-size: 0.9em;
.selected {
background-color: @component-active-color;
color: @component-active-bg;
}
.edit-icon {
display: none;
cursor: pointer;
}
.editable-item {
padding: (@padding-small-vertical - 1) @padding-small-horizontal;
cursor: default;
border-bottom: 1px solid @border-color-divider;
flex-shrink: 0;
&.selected.with-edit-icon {
display: flex;
align-items: center;
padding-right: 20px;
img.edit-icon {
display: inline;
background-color: @component-active-bg;
margin-left: auto;
}
}
&>input {
border: none;
padding: 0;
font-size: inherit;
background-color: @component-active-color;
color: @component-active-bg;
line-height: 1.5;
}
::-webkit-input-placeholder {
color: @text-color-inverse-very-subtle;
}
}
.create-item-input {
&>input {
padding: (@padding-small-vertical - 1) @padding-small-horizontal;
border: none;
border-bottom: 1px solid @border-color-divider;
font-size: inherit;
}
::-webkit-input-placeholder {
font-style: italic;
}
}
}
.buttons-wrapper {
display: flex;
border: 1px solid @border-secondary-bg;
border-top: none;
background-color: @background-secondary;
.btn-editable-list {
display: flex;
justify-content: center;
height: 25px;
width: 25px;
border-right: 1px solid #dddddd;
font-size: 1em;
cursor: default;
color: @text-color-subtle;
}
}
}