Skip to content

Commit

Permalink
Sanding and shimming in CSS related to Create menu
Browse files Browse the repository at this point in the history
- Create menu labels can now wrap.
- Line height, padding adjusted for menu items.
- Create menu filter input slimmed down a bit.
  • Loading branch information
charlesh88 committed Jan 7, 2025
1 parent f68fdb0 commit 9309366
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 29 deletions.
3 changes: 1 addition & 2 deletions src/api/menu/components/SuperMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@
:style="styleObject"
>
<div class="c-super-menu__left-col">
<div v-if="options.filterable" class="c-super-menu__filter">
<div v-if="options.filterable" class="c-super-menu__filter l-input-lg">
<input
ref="filterInput"
v-model="searchTerm"
type="text"
placeholder="Filter..."
class="c-super-menu__filter-input"
@input="filterItems"
@keydown.stop="handleKeyDown"
@click.stop
Expand Down
2 changes: 1 addition & 1 deletion src/styles/_constants-darkmatter.scss
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ $colorMenuElementHilite: pullForward($colorMenuBg, 10%);
$shdwMenu: rgba(black, 0.8) 0 2px 10px;
$shdwMenuInner: inset 0 0 0 1px rgba(white, 0.2);
$shdwMenuText: none;
$menuItemPad: $interiorMargin, floor($interiorMargin * 1.25);
$menuItemPad: 4px, 6px;

// Palettes and Swatches
$paletteItemBorderOuterColorSelected: black;
Expand Down
2 changes: 1 addition & 1 deletion src/styles/_constants-espresso.scss
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ $colorMenuElementHilite: pullForward($colorMenuBg, 10%);
$shdwMenu: rgba(black, 0.8) 0 2px 10px;
$shdwMenuInner: inset 0 0 0 1px rgba(white, 0.2);
$shdwMenuText: none;
$menuItemPad: $interiorMargin, floor($interiorMargin * 1.25);
$menuItemPad: 4px, 6px;

// Palettes and Swatches
$paletteItemBorderOuterColorSelected: black;
Expand Down
2 changes: 1 addition & 1 deletion src/styles/_constants-maelstrom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ $colorMenuElementHilite: pullForward($colorMenuBg, 10%);
$shdwMenu: rgba(black, 0.8) 0 2px 10px;
$shdwMenuInner: inset 0 0 0 1px rgba(white, 0.2);
$shdwMenuText: none;
$menuItemPad: $interiorMargin, floor($interiorMargin * 1.25);
$menuItemPad: 4px, 6px;

// Palettes and Swatches
$paletteItemBorderOuterColorSelected: black;
Expand Down
2 changes: 1 addition & 1 deletion src/styles/_constants-snow.scss
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ $colorMenuElementHilite: darken($colorMenuBg, 10%);
$shdwMenu: rgba(black, 0.8) 0 2px 10px;
$shdwMenuInner: none;
$shdwMenuText: none;
$menuItemPad: $interiorMargin, floor($interiorMargin * 1.25);
$menuItemPad: 4px, 6px;

// Palettes and Swatches
$paletteItemBorderOuterColorSelected: black;
Expand Down
27 changes: 4 additions & 23 deletions src/styles/_controls.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@
@mixin menuInner() {
li {
@include cControl();
align-items: baseline;
justify-content: start;
cursor: pointer;
display: flex;
line-height: 1.2em;
padding: nth($menuItemPad, 1) nth($menuItemPad, 2);
white-space: nowrap;

Expand Down Expand Up @@ -651,38 +653,16 @@ select {
padding: $interiorMarginLg;
flex-direction: row;

> [class*='__'] {
//flex: 1 1 50%;
//&:first-child {
// margin-right: $m;
//}

&:last-child {
//border-left: 1px solid $colorInteriorBorder;
//padding-left: $m;
}
}

&__left-col {
display: flex;
flex-direction: column;
flex: 1 1 50%;
gap: $interiorMargin;
margin-right: $m;
}

&__filter {
flex: 0 0 auto;
width: 100%;
margin-bottom: $interiorMarginLg;

.c-super-menu__filter-input {
@include nice-input();
width: 100%;
padding: $interiorMargin;
&:focus {
background: $colorInputBg;
}
}
}

&__menu {
Expand All @@ -696,6 +676,7 @@ select {

li {
border-radius: $controlCr;
white-space: normal; // Let long names wrap
}
}

Expand Down

0 comments on commit 9309366

Please sign in to comment.