R&I Misc UI 4b ()

* Styling for selects
- New cleaner styling approach;
- New cSelect and appearanceNone mixins;
- Converted selects in Notebook, plot-options-edit;

* List View fixes
- Ellipsizing now works;
- Better icon and text alignment;

* Remove updateDrilledIn function and calls

* Telemetry Table editing styles

- Headers now have hover effects;

* Change 'toggle'-style toolbar buttons to reflect current state, rather
than what will be the setting once clicked
- When frame is hidden, button displays the frame-hidden icon, and
tooltip says 'Frame hidden';

* Enable all sub-object views in Display Layout to use numeric inputs for
x, y, width and height

* Toolbar sanding and polishing
- Button order tweaked to place stack order near X, Y, etc. inputs;
- Improved spacing between items themselves and separators;

* Fix indentation

* Fix indentation part deux
This commit is contained in:
Charles Hacskaylo 2019-01-25 12:50:16 -08:00 committed by Pegah Sarram
parent ac11f898d4
commit 075d4deecb
13 changed files with 263 additions and 236 deletions

@ -32,7 +32,7 @@ define([], function () {
// is inside a layout, or the main layout is selected. // is inside a layout, or the main layout is selected.
return (openmct.editor.isEditing() && selection && return (openmct.editor.isEditing() && selection &&
((selection[1] && selection[1].context.item && selection[1].context.item.type === 'layout') || ((selection[1] && selection[1].context.item && selection[1].context.item.type === 'layout') ||
(selection[0].context.item && selection[0].context.item.type === 'layout'))); (selection[0].context.item && selection[0].context.item.type === 'layout')));
}, },
toolbar: function (selection) { toolbar: function (selection) {
const DIALOG_FORM = { const DIALOG_FORM = {
@ -196,24 +196,62 @@ define([], function () {
options: [ options: [
{ {
value: false, value: false,
icon: "icon-grid-snap-no", icon: "icon-grid-snap-to",
title: "Do not snap to grid" title: "Grid snapping enabled"
}, },
{ {
value: true, value: true,
icon: "icon-grid-snap-to", icon: "icon-grid-snap-no",
title: "Snap to grid" title: "Grid snapping disabled"
} }
] ]
}; };
let x = {
control: "input",
type: "number",
domainObject: selectedParent,
property: function () {
return getPath() + ".x";
},
label: "X:",
title: "X position"
},
y = {
control: "input",
type: "number",
domainObject: selectedParent,
property: function () {
return getPath() + ".y";
},
label: "Y:",
title: "Y position",
},
width = {
control: 'input',
type: 'number',
domainObject: selectedParent,
property: function () {
return getPath() + ".width";
},
label: 'W:',
title: 'Resize object width'
},
height = {
control: 'input',
type: 'number',
domainObject: selectedParent,
property: function () {
return getPath() + ".height";
},
label: 'H:',
title: 'Resize object height'
};
if (layoutItem.type === 'subobject-view') { if (layoutItem.type === 'subobject-view') {
if (toolbar.length > 0) { if (toolbar.length > 0) {
toolbar.push(separator); toolbar.push(separator);
} }
toolbar.push(stackOrder);
toolbar.push(separator);
toolbar.push({ toolbar.push({
control: "toggle-button", control: "toggle-button",
domainObject: selectedParent, domainObject: selectedParent,
@ -223,154 +261,119 @@ define([], function () {
options: [ options: [
{ {
value: false, value: false,
icon: 'icon-frame-hide', icon: 'icon-frame-show',
title: "Hide frame" title: "Frame visible"
}, },
{ {
value: true, value: true,
icon: 'icon-frame-show', icon: 'icon-frame-hide',
title: "Show frame" title: "Frame hidden"
} }
] ]
}); });
toolbar.push(separator); toolbar.push(separator);
toolbar.push(stackOrder);
toolbar.push(x);
toolbar.push(y);
toolbar.push(width);
toolbar.push(height);
toolbar.push(useGrid); toolbar.push(useGrid);
toolbar.push(separator); toolbar.push(separator);
toolbar.push(remove); toolbar.push(remove);
} else { } else {
const TEXT_SIZE = [9, 10, 11, 12, 13, 14, 15, 16, 20, 24, 30, 36, 48, 72, 96]; const TEXT_SIZE = [8, 9, 10, 11, 12, 13, 14, 15, 16, 20, 24, 30, 36, 48, 72, 96, 128];
let fill = { let fill = {
control: "color-picker", control: "color-picker",
domainObject: selectedParent, domainObject: selectedParent,
property: function () { property: function () {
return getPath() + ".fill"; return getPath() + ".fill";
},
icon: "icon-paint-bucket",
title: "Set fill color"
}, },
stroke = { icon: "icon-paint-bucket",
control: "color-picker", title: "Set fill color"
domainObject: selectedParent, },
property: function () { stroke = {
return getPath() + ".stroke"; control: "color-picker",
}, domainObject: selectedParent,
icon: "icon-line-horz", property: function () {
title: "Set border color" return getPath() + ".stroke";
}, },
color = { icon: "icon-line-horz",
control: "color-picker", title: "Set border color"
domainObject: selectedParent, },
property: function () { color = {
return getPath() + ".color"; control: "color-picker",
}, domainObject: selectedParent,
icon: "icon-font", property: function () {
mandatory: true, return getPath() + ".color";
title: "Set text color",
preventNone: true
}, },
size = { icon: "icon-font",
control: "select-menu", mandatory: true,
domainObject: selectedParent, title: "Set text color",
property: function () { preventNone: true
return getPath() + ".size"; },
}, size = {
title: "Set text size", control: "select-menu",
options: TEXT_SIZE.map(size => { domainObject: selectedParent,
return { property: function () {
value: size + "px" return getPath() + ".size";
};
})
}, },
x = { title: "Set text size",
control: "input", options: TEXT_SIZE.map(size => {
type: "number", return {
domainObject: selectedParent, value: size + "px"
property: function () { };
return getPath() + ".x"; })
}, };
label: "X:",
title: "X position"
},
y = {
control: "input",
type: "number",
domainObject: selectedParent,
property: function () {
return getPath() + ".y";
},
label: "Y:",
title: "Y position",
},
width = {
control: 'input',
type: 'number',
domainObject: selectedParent,
property: function () {
return getPath() + ".width";
},
label: 'W:',
title: 'Resize object width'
},
height = {
control: 'input',
type: 'number',
domainObject: selectedParent,
property: function () {
return getPath() + ".height";
},
label: 'H:',
title: 'Resize object height'
};
if (layoutItem.type === 'telemetry-view') { if (layoutItem.type === 'telemetry-view') {
let displayMode = { let displayMode = {
control: "select-menu", control: "select-menu",
domainObject: selectedParent, domainObject: selectedParent,
property: function () { property: function () {
return getPath() + ".displayMode"; return getPath() + ".displayMode";
},
title: "Set display mode",
options: [
{
name: 'Label + Value',
value: 'all'
},
{
name: "Label only",
value: "label"
},
{
name: "Value only",
value: "value"
}
]
}, },
value = { title: "Set display mode",
control: "select-menu", options: [
domainObject: selectedParent, {
property: function () { name: 'Label + Value',
return getPath() + ".value"; value: 'all'
}, },
title: "Set value", {
options: openmct.telemetry.getMetadata(selectedObject).values().map(value => { name: "Label only",
return { value: "label"
name: value.name, },
value: value.key {
} name: "Value only",
}) value: "value"
}; }
]
},
value = {
control: "select-menu",
domainObject: selectedParent,
property: function () {
return getPath() + ".value";
},
title: "Set value",
options: openmct.telemetry.getMetadata(selectedObject).values().map(value => {
return {
name: value.name,
value: value.key
}
})
};
toolbar = [ toolbar = [
displayMode, displayMode,
separator, separator,
value, value,
separator, separator,
stackOrder,
fill, fill,
stroke, stroke,
color, color,
separator, separator,
size, size,
separator, separator,
stackOrder,
x, x,
y, y,
height, height,
@ -379,7 +382,7 @@ define([], function () {
separator, separator,
remove remove
]; ];
} else if (layoutItem.type === 'text-view' ) { } else if (layoutItem.type === 'text-view') {
let text = { let text = {
control: "button", control: "button",
domainObject: selectedParent, domainObject: selectedParent,
@ -391,13 +394,13 @@ define([], function () {
dialog: DIALOG_FORM['text'] dialog: DIALOG_FORM['text']
}; };
toolbar = [ toolbar = [
stackOrder,
fill, fill,
stroke, stroke,
separator, separator,
color, color,
size, size,
separator, separator,
stackOrder,
x, x,
y, y,
height, height,
@ -410,10 +413,10 @@ define([], function () {
]; ];
} else if (layoutItem.type === 'box-view') { } else if (layoutItem.type === 'box-view') {
toolbar = [ toolbar = [
stackOrder,
fill, fill,
stroke, stroke,
separator, separator,
stackOrder,
x, x,
y, y,
height, height,
@ -434,9 +437,9 @@ define([], function () {
dialog: DIALOG_FORM['image'] dialog: DIALOG_FORM['image']
}; };
toolbar = [ toolbar = [
stackOrder,
stroke, stroke,
separator, separator,
stackOrder,
x, x,
y, y,
height, height,
@ -469,9 +472,9 @@ define([], function () {
title: "Y2 position", title: "Y2 position",
}; };
toolbar = [ toolbar = [
stackOrder,
stroke, stroke,
separator, separator,
stackOrder,
x, x,
y, y,
x2, x2,

@ -171,8 +171,6 @@
if (itemIndex !== undefined) { if (itemIndex !== undefined) {
this.attachSelectionListener(itemIndex); this.attachSelectionListener(itemIndex);
} }
this.updateDrilledIn();
}, },
attachSelectionListener(index) { attachSelectionListener(index) {
let path = `configuration.items[${index}].useGrid`; let path = `configuration.items[${index}].useGrid`;
@ -208,15 +206,6 @@
this.mutate(`configuration.items[${index}]`, item); this.mutate(`configuration.items[${index}]`, item);
}.bind(this)); }.bind(this));
}, },
updateDrilledIn(drilledInItem) {
let identifier = drilledInItem && this.openmct.objects.makeKeyString(drilledInItem.identifier);
this.drilledIn = identifier;
this.layoutItems.forEach(item => {
if (item.type === 'subobject-view') {
item.drilledIn = this.openmct.objects.makeKeyString(item.identifier) === identifier;
}
});
},
bypassSelection($event) { bypassSelection($event) {
if (this.dragInProgress) { if (this.dragInProgress) {
if ($event) { if ($event) {

@ -57,14 +57,14 @@ function ToolbarProvider(openmct) {
property: 'configuration.rowsLayout', property: 'configuration.rowsLayout',
options: [ options: [
{ {
value: false, value: true,
icon: 'icon-columns', icon: 'icon-columns',
title: 'Columns' title: 'Columns layout'
}, },
{ {
value: true, value: false,
icon: 'icon-rows', icon: 'icon-rows',
title: 'Rows' title: 'Rows layout'
} }
] ]
}; };
@ -120,14 +120,14 @@ function ToolbarProvider(openmct) {
property: `configuration.containers[${containerIndex}].frames[${frameIndex}].noFrame`, property: `configuration.containers[${containerIndex}].frames[${frameIndex}].noFrame`,
options: [ options: [
{ {
value: true, value: false,
icon: 'icon-frame-hide', icon: 'icon-frame-hide',
title: "Hide frame" title: "Frame hidden"
}, },
{ {
value: false, value: true,
icon: 'icon-frame-show', icon: 'icon-frame-show',
title: "Show frame" title: "Frame visible"
} }
] ]
}; };

@ -4,9 +4,8 @@
@click="navigate"> @click="navigate">
<td class="c-list-item__name"> <td class="c-list-item__name">
<a :href="objectLink" ref="objectLink"> <a :href="objectLink" ref="objectLink">
<div class="c-list-item__type-icon" <div class="c-list-item__type-icon" :class="item.type.cssClass"></div>
:class="item.type.cssClass"></div> <div class="c-list-item__name-value">{{item.model.name}}</div>
{{item.model.name}}
</a> </a>
</td> </td>
<td class="c-list-item__type">{{ item.type.name }}</td> <td class="c-list-item__type">{{ item.type.name }}</td>
@ -20,17 +19,24 @@
/******************************* LIST ITEM */ /******************************* LIST ITEM */
.c-list-item { .c-list-item {
&__name { &__name a {
@include ellipsize(); display: flex;
> * + * { margin-left: $interiorMarginSm; }
} }
&__type-icon { &__type-icon {
// Have to do it this way instead of using icon-* class, due to need to apply alias to the icon
color: $colorKey; color: $colorKey;
display: inline-block; display: inline-block;
width: 1em; width: 1em;
margin-right:$interiorMarginSm; margin-right:$interiorMarginSm;
} }
&__name-value {
@include ellipsize();
}
&.is-alias { &.is-alias {
// Object is an alias to an original. // Object is an alias to an original.
[class*='__type-icon'] { [class*='__type-icon'] {
@ -48,7 +54,6 @@
} }
} }
} }
</style> </style>
<script> <script>

@ -78,9 +78,12 @@
td { td {
$p: floor($interiorMargin * 1.5); $p: floor($interiorMargin * 1.5);
font-size: 1.1em; @include ellipsize();
line-height: 120%; // Needed for icon alignment
max-width: 0;
padding-top: $p; padding-top: $p;
padding-bottom: $p; padding-bottom: $p;
width: 25%;
&:not(.c-list-item__name) { &:not(.c-list-item__name) {
color: $colorItemFgDetails; color: $colorItemFgDetails;

@ -5,21 +5,17 @@
@input="search" @input="search"
@clear="search"> @clear="search">
</search> </search>
<div class="c-notebook__controls"> <div class="c-notebook__controls ">
<div class="select c-notebook__controls__time"> <select class="c-notebook__controls__time" v-model="showTime">
<select v-model="showTime"> <option value="0" selected="selected">Show all</option>
<option value="0" selected="selected">Show all</option> <option value="1">Last hour</option>
<option value="1">Last hour</option> <option value="8">Last 8 hours</option>
<option value="8">Last 8 hours</option> <option value="24">Last 24 hours</option>
<option value="24">Last 24 hours</option> </select>
</select> <select class="c-notebook__controls__time" v-model="sortEntries">
</div> <option value="newest" :selected="sortEntries === 'newest'">Newest first</option>
<div class="select c-notebook__controls__sort"> <option value="oldest" :selected="sortEntries === 'oldest'">Oldest first</option>
<select v-model="sortEntries"> </select>
<option value="newest" :selected="sortEntries === 'newest'">Newest first</option>
<option value="oldest" :selected="sortEntries === 'oldest'">Oldest first</option>
</select>
</div>
</div> </div>
</div> </div>
<div class="c-notebook__drag-area icon-plus" <div class="c-notebook__drag-area icon-plus"

@ -41,28 +41,24 @@
<div class="grid-cell label" <div class="grid-cell label"
title="The field to be plotted as a value for this series.">Value</div> title="The field to be plotted as a value for this series.">Value</div>
<div class="grid-cell value"> <div class="grid-cell value">
<div class="select"> <select ng-model="form.yKey">
<select ng-model="form.yKey"> <option ng-repeat="option in yKeyOptions"
<option ng-repeat="option in yKeyOptions" value="{{option.value}}"
value="{{option.value}}" ng-selected="option.value == form.yKey">
ng-selected="option.value == form.yKey"> {{option.name}}
{{option.name}} </option>
</option> </select>
</select>
</div>
</div> </div>
</li> </li>
<li class="grid-row"> <li class="grid-row">
<div class="grid-cell label" <div class="grid-cell label"
title="The line rendering style for this series.">Line Style</div> title="The line rendering style for this series.">Line Style</div>
<div class="grid-cell value"> <div class="grid-cell value">
<div class="select"> <select ng-model="form.interpolate">
<select ng-model="form.interpolate"> <option value="none">None</option>
<option value="none">None</option> <option value="linear">Linear interpolate</option>
<option value="linear">Linear interpolate</option> <option value="stepAfter">Step after</option>
<option value="stepAfter">Step after</option> </select>
</select>
</div>
</div> </div>
</li> </li>
<li class="grid-row"> <li class="grid-row">
@ -160,15 +156,13 @@
<div class="grid-cell label" <div class="grid-cell label"
title="The position of the legend relative to the plot display area.">Position</div> title="The position of the legend relative to the plot display area.">Position</div>
<div class="grid-cell value"> <div class="grid-cell value">
<div class="select"> <select ng-model="form.position">
<select ng-model="form.position"> <option value="hidden">Hidden</option>
<option value="hidden">Hidden</option> <option value="top">Top</option>
<option value="top">Top</option> <option value="right">Right</option>
<option value="right">Right</option> <option value="bottom">Bottom</option>
<option value="bottom">Bottom</option> <option value="left">Left</option>
<option value="left">Left</option> </select>
</select>
</div>
</div> </div>
</li> </li>
<li class="grid-row"> <li class="grid-row">
@ -180,15 +174,13 @@
<div class="grid-cell label" <div class="grid-cell label"
title="What to display in the legend when it's collapsed.">When collapsed show</div> title="What to display in the legend when it's collapsed.">When collapsed show</div>
<div class="grid-cell value"> <div class="grid-cell value">
<div class="select"> <select ng-model="form.valueToShowWhenCollapsed">
<select ng-model="form.valueToShowWhenCollapsed"> <option value="none">Nothing</option>
<option value="none">nothing</option> <option value="nearestTimestamp">Nearest timestamp</option>
<option value="nearestTimestamp">nearest timestamp</option> <option value="nearestValue">Nearest value</option>
<option value="nearestValue">nearest Value</option> <option value="min">Minimum value</option>
<option value="min">minimum value</option> <option value="max">Maximum value</option>
<option value="max">maximum value</option> </select>
</select>
</div>
</div> </div>
</li> </li>
<li class="grid-row"> <li class="grid-row">

@ -34,7 +34,7 @@
<div class="c-telemetry-table__headers-w js-table__headers-w" ref="headersTable" :style="{ 'max-width': widthWithScroll}"> <div class="c-telemetry-table__headers-w js-table__headers-w" ref="headersTable" :style="{ 'max-width': widthWithScroll}">
<table class="c-table__headers c-telemetry-table__headers"> <table class="c-table__headers c-telemetry-table__headers">
<thead> <thead>
<tr> <tr class="c-telemetry-table__headers__name">
<table-column-header <table-column-header
v-for="(title, key, headerIndex) in headers" v-for="(title, key, headerIndex) in headers"
:key="key" :key="key"
@ -50,7 +50,7 @@
:sortOptions="sortOptions" :sortOptions="sortOptions"
>{{title}}</table-column-header> >{{title}}</table-column-header>
</tr> </tr>
<tr> <tr class="c-telemetry-table__headers__filter">
<table-column-header <table-column-header
v-for="(title, key, headerIndex) in headers" v-for="(title, key, headerIndex) in headers"
:key="key" :key="key"
@ -214,6 +214,22 @@
} }
} }
/******************************* EDITING */
.is-editing {
.c-telemetry-table__headers__name {
th[draggable],
th[draggable] > * {
cursor: move;
}
th[draggable]:hover {
$b: $editFrameHovMovebarColorBg;
background: $b;
> * { background: $b; }
}
}
}
/******************************* LEGACY */ /******************************* LEGACY */
.s-status-taking-snapshot, .s-status-taking-snapshot,
.overlay.snapshot { .overlay.snapshot {

@ -381,17 +381,6 @@ $createBtnTextTransform: uppercase;
box-shadow: rgba(black, 0.5) 0 0.5px 2px; box-shadow: rgba(black, 0.5) 0 0.5px 2px;
} }
/**************************************************** NOT USED, LEAVE FOR NOW */ @mixin themedSelect($bg: $colorBtnBg, $fg: $colorBtnFg) {
// Slider controls, not in use @include cSelect(linear-gradient(lighten($bg, 5%), $bg), $fg, lighten($bg, 20%), rgba(black, 0.5) 0 0.5px 3px);
/* }
$sliderColorBase: $colorKey;
$sliderColorRangeHolder: rgba(black, 0.07);
$sliderColorRange: rgba($sliderColorBase, 0.2);
$sliderColorRangeHov: rgba($sliderColorBase, 0.4);
$sliderColorKnob: pushBack($sliderColorBase, 20%);
$sliderColorKnobHov: rgba($sliderColorBase, 0.7);
$sliderColorRangeValHovBg: $sliderColorRange;
$sliderColorRangeValHovFg: $colorBodyFg;
$sliderKnobW: 15px;
$sliderKnobR: 2px;
*/

@ -385,6 +385,10 @@ $createBtnTextTransform: uppercase;
box-shadow: rgba(black, 0.5) 0 0.5px 2px; box-shadow: rgba(black, 0.5) 0 0.5px 2px;
} }
@mixin themedSelect($bg: $colorBtnBg, $fg: $colorBtnFg) {
@include cSelect(linear-gradient(lighten($bg, 5%), $bg), $fg, lighten($bg, 20%), rgba(black, 0.5) 0 0.5px 3px);
}
/**************************************************** OVERRIDES */ /**************************************************** OVERRIDES */
.c-frame { .c-frame {
&:not(.no-frame) { &:not(.no-frame) {

@ -380,16 +380,6 @@ $createBtnTextTransform: uppercase;
background: $c; background: $c;
} }
@mixin themedSelect($bg: $colorBtnBg, $fg: $colorBtnFg) {
/**************************************************** NOT USED, LEAVE FOR NOW */ @include cSelect($bg, $fg, lighten($bg, 20%), none);
}
// Content status
/*
$colorAlert: #ff3c00;
$colorWarningHi: #990000;
$colorWarningLo: #ff9900;
$colorDiagnostic: #a4b442;
$colorCommand: #3693bd;
$colorInfo: #2294a2;
$colorOk: #33cc33;
*/

@ -228,6 +228,17 @@ input[type=number]::-webkit-outer-spin-button {
} }
} }
// SELECTS
select {
@include appearanceNone();
@include themedSelect();
background-repeat: no-repeat, no-repeat;
background-position: right .4em top 80%, 0 0;
border: none;
border-radius: $controlCr;
padding: 1px 20px 1px $interiorMargin;
}
/******************************************************** HYPERLINKS AND HYPERLINK BUTTONS */ /******************************************************** HYPERLINKS AND HYPERLINK BUTTONS */
.c-hyperlink { .c-hyperlink {
&--link { &--link {
@ -411,7 +422,7 @@ input[type=number]::-webkit-outer-spin-button {
} }
@mixin cToolbarSeparator() { @mixin cToolbarSeparator() {
$m: $interiorMargin; $m: 1px;
$b: 1px; $b: 1px;
display: block; display: block;
width: $m + $b; // Allow for border width: $m + $b; // Allow for border
@ -426,6 +437,10 @@ input[type=number]::-webkit-outer-spin-button {
height: $p + 24px; // Need to standardize the height height: $p + 24px; // Need to standardize the height
padding: $p; padding: $p;
> * + * {
margin-left: 2px;
}
&__separator { &__separator {
@include cToolbarSeparator(); @include cToolbarSeparator();
} }

@ -60,6 +60,16 @@
width: $d; width: $d;
} }
@mixin appearanceNone() {
-moz-appearance: none;
-webkit-appearance: none;
appearance: none;
&:focus {
outline: none;
}
}
@mixin isAlias() { @mixin isAlias() {
&:after { &:after {
color:$colorIconAlias; color:$colorIconAlias;
@ -209,7 +219,7 @@
} }
@mixin htmlInputReset() { @mixin htmlInputReset() {
appearance: none; @include appearanceNone();
background: transparent; background: transparent;
border: none; border: none;
border-radius: 0; border-radius: 0;
@ -278,6 +288,7 @@
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
line-height: $fs; // Remove effect on top and bottom padding
overflow: hidden; overflow: hidden;
&:before, &:before,
@ -287,6 +298,10 @@
flex: 0 0 auto; flex: 0 0 auto;
} }
&:before {
font-size: 0.9em;
}
&:after { &:after {
font-size: 0.8em; font-size: 0.8em;
} }
@ -294,15 +309,18 @@
[class*="__label"] { [class*="__label"] {
@include ellipsize(); @include ellipsize();
display: block; display: block;
line-height: $fs; // Remove effect on top and bottom padding
font-size: $fs; font-size: $fs;
} }
&[class*='icon'] > [class*="__label"] {
// When button holds both an icon and a label, provide margin between them.
margin-left: $interiorMarginSm;
}
} }
@mixin cButton() { @mixin cButton() {
@include cControl(); @include cControl();
@include themedButton(); @include themedButton();
//@include buttonBehavior();
border-radius: $controlCr; border-radius: $controlCr;
color: $colorBtnFg; color: $colorBtnFg;
cursor: pointer; cursor: pointer;
@ -436,6 +454,13 @@
} }
} }
@mixin cSelect($bg, $fg, $arwClr, $shdw) {
$svgArwClr: str-slice(inspect($arwClr), 2, str-length(inspect($arwClr))); // Remove initial # in color value
background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3e%3cpath fill='%23#{$svgArwClr}' d='M5 5l5-5H0z'/%3e%3c/svg%3e"), $bg;
color: $fg;
box-shadow: $shdw;
}
@mixin wrappedInput() { @mixin wrappedInput() {
// An input that is wrapped. Optionally includes a __label or icon element. // An input that is wrapped. Optionally includes a __label or icon element.
// Based on .c-search. // Based on .c-search.