No notes defined.
<!-- Default -->
<div class="sds-select">
<select id="" class="sds-select form-control">
<option value="opt-0">Option 1</option>
<option value="opt-1">Option 2</option>
<option value="opt-2">Option 3</option>
</select>
<span class="sds-select__arrow sds-icon sds-icon-chevrondown" aria-hidden="true"></span>
</div>
<!-- Hint -->
<div class="sds-select">
<select id="" class="sds-select form-control">
<option value="opt-0">Option 1</option>
<option value="opt-1">Option 2</option>
<option value="opt-2">Option 3</option>
</select>
<span class="sds-select__arrow sds-icon sds-icon-chevrondown" aria-hidden="true"></span>
<div class="sds-select__hint">Select hint</div>
</div>
<!-- Disabled -->
<div class="sds-select">
<select id="" class="sds-select form-control" disabled>
<option value="opt-0">Option 1</option>
<option value="opt-1">Option 2</option>
<option value="opt-2">Option 3</option>
</select>
<span class="sds-select__arrow sds-icon sds-icon-chevrondown" aria-hidden="true"></span>
</div>
<!-- Readonly -->
<div class="sds-select">
<select id="" class="sds-select form-control" readonly>
<option value="opt-0">Option 1</option>
<option disabled value="opt-1">Option 2</option>
<option disabled value="opt-2">Option 3</option>
</select>
<span class="sds-select__arrow sds-icon sds-icon-chevrondown" aria-hidden="true"></span>
</div>
<!-- Error -->
<div class="sds-select">
<select id="" class="sds-select form-control is-invalid">
<option value="opt-0">Option 1</option>
<option value="opt-1">Option 2</option>
<option value="opt-2">Option 3</option>
</select>
<span class="sds-select__arrow sds-icon sds-icon-chevrondown" aria-hidden="true"></span>
<div class="invalid-feedback">Select error</div>
</div>
<!-- Inline Large -->
<div class="sds-select -inline -bodyXl">
<select id="" class="sds-select form-control -secondary60">
<option value="opt-0">Option 1</option>
<option value="opt-1">Option 2</option>
<option value="opt-2">Option 3</option>
</select>
<span class="sds-select__arrow sds-icon sds-icon-chevrondown" aria-hidden="true"></span>
</div>
<div class="{{ namespace }}select{% for mod in parentModifiers %} {{ mod }}{% endfor %}">
<select id="{{ id }}" class="{{ namespace }}select form-control{% for mod in modifiers %} {{ mod }}{% endfor %}{% for mod in classes %} {{ mod }}{% endfor %}"{% if disabled %} disabled{% endif %}{% if readonly %} readonly{% endif %}>
{% for optionKey, option in options %}
{% if option %}
<option{% if option.state %} {{ option.state }}{% endif %} value="opt-{{ optionKey }}">{{ option.value }}</option>
{% endif %}
{% endfor %}
</select>
<span class="{{ namespace }}select__arrow {{ namespace }}icon {{ namespace }}icon-chevrondown" aria-hidden="true"></span>
{% if error %}
<div class="invalid-feedback">Select error</div>
{% endif %}
{% if hint %}
<div class="{{ namespace }}select__hint">{{ hint.feedback }}</div>
{% endif %}
</div>
/* variables specific to current element */
$select-arrow-width: $select-arrow-width-global;
.#{$namespace}select {
/* Save root element context for easy access if nesting is needed */
$self: &;
/* properties of current element + media queries */
/* @TODO remove old styles !important */
position: relative;
width: 100%;
text-align: left;
/* Pseudo Elements */
&::before {
}
&::after {
}
/*
Include elements that are linked to the current element but have to reside at the root level of the stylesheet
(e.g: keyframes)
*/
@at-root {
}
/* children - write selector in full in comments in order to facilitate search */
OPTION {
font: -moz-pull-down-menu;
}
// select__arrow
&__arrow {
// follows same logic as parent
@include custom-prop-fallback("color","sys-color-text-primary-muted");
position: absolute;
z-index: z("low");
top: 0;
right: $input-padding-x;
width: $select-arrow-width;
height: $input-height;
display: flex;
align-items: center;
justify-content: center;
line-height: 1;
pointer-events: none;
}
&__hint {
@include form-feedback-hint();
}
// readonly
SELECT[disabled] + #{$self}__arrow,
SELECT[readonly] + #{$self}__arrow {
@include custom-prop-fallback("color","sys-color-text-neutral-vivid");
}
/* modifiers */
// select -inline
&.-inline {
display: inline-block;
width: auto;
}
&.-bodyXl {
@extend %textBodyXl;
}
&.-select2xl {
@extend %textBodyXxl;
> .form-control {
line-height: map-deep-get($token-font-line-height-map, "xs");
font-weight: map-deep-get($token-font-weight-map, "regular");
height: subtract($input-height-2xl, $border-width);
@include media-breakpoint-up(xl) {
height: $input-height-2xl;
}
}
#{$self}__arrow {
height: subtract($input-height-2xl, $border-width);
@extend %textBodyXxl;
@include media-breakpoint-up(xl) {
height: $input-height-2xl;
}
}
}
&.-secondary60 {
@include custom-prop-fallback("color","sys-color-text-primary-muted");
}
/* random parent element */
/*
*
* Syntax : .randomParentElt & {}
*
*/
/* Pseudo Classes */
&:hover {
@media (hover: hover) {
}
}
&:focus {
.form-control {
@include custom-prop-fallback("border-bottom-color", "comp-input-active-border-color");
}
}
&:active {
}
&:focus,
&:active {
}
}