fix kb nav in debug and debug styling

This commit is contained in:
thecozies 2024-03-02 14:22:30 -06:00
parent 39fd31f731
commit d3bb526c91
3 changed files with 76 additions and 45 deletions

View File

@ -9,32 +9,38 @@
<div class="config-debug-option">
<label
class="config-debug-option__label"
>Warp</label>
<div class="config-debug__option-controls">
<div class="config-debug__select-wrapper">
<div class="config-debug__select-label"><div>Region</div></div>
<select data-value="area_index" onchange="area_index_changed">
<option data-for="area, i : area_names" data-attr-value="i">{{area}}</option>
</select>
>
<div>Warp</div>
</label>
<div class="config-debug__option-split">
<div class="config-debug__option-controls">
<div class="config-debug__select-wrapper">
<div class="config-debug__select-label"><div>Region</div></div>
<select data-value="area_index" onchange="area_index_changed">
<option data-for="area, i : area_names" data-attr-value="i">{{area}}</option>
</select>
</div>
<div class="config-debug__select-wrapper">
<div class="config-debug__select-label"><div>Scene</div></div>
<select data-value="scene_index" onchange="scene_index_changed">
<option data-for="scene, i : scene_names" data-attr-value="i">{{scene}}</option>
</select>
</div>
<div class="config-debug__select-wrapper">
<div class="config-debug__select-label"><div>Entrance</div></div>
<select data-value="entrance_index">
<option data-for="entrance, i : entrance_names" data-attr-value="i">{{entrance}}</option>
</select>
</div>
</div>
<div class="config-debug__select-wrapper">
<div class="config-debug__select-label"><div>Scene</div></div>
<select data-value="scene_index" onchange="scene_index_changed">
<option data-for="scene, i : scene_names" data-attr-value="i">{{scene}}</option>
</select>
</div>
<div class="config-debug__select-wrapper">
<div class="config-debug__select-label"><div>Entrance</div></div>
<select data-value="entrance_index">
<option data-for="entrance, i : entrance_names" data-attr-value="i">{{entrance}}</option>
</select>
<div class="config-debug__option-trigger">
<button
class="icon-button icon-button--success" onclick="do_warp"
>
<svg src="icons/Arrow.svg" />
</button>
</div>
</div>
<button
class="icon-button icon-button--success" onclick="do_warp"
>
<svg src="icons/Arrow.svg" />
</button>
</div>
</div>
</div>

File diff suppressed because one or more lines are too long

View File

@ -18,15 +18,13 @@
.config-debug-option {
@include set-color($color-text-dim);
@include trans-colors-svg;
display: flex;
@include border-bottom($color-border-soft);
display: block;
position: relative;
flex-direction: row;
align-items: center;
justify-content: space-between;
flex-direction: column;
width: 100%;
height: auto;
padding: space(4) space(16) space(4) space(20);
border-radius: $border-radius-sm;
padding: space(12) space(4);
background-color: rgba(0, 0, 0, 0);
&:focus-visible:not(:disabled, [disabled]),
@ -40,26 +38,41 @@
}
.icon-button {
flex: 1 1 auto;
margin-left: space(8);
}
}
.config-debug__option-split {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.config-debug-option__label {
@extend %label-md;
flex: 1 1 auto;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
padding: space(4) space(16) space(12);
width: auto;
height: auto;
white-space: nowrap;
}
.config-debug__option-controls {
display: flex;
display: block;
position: relative;
flex-direction: row;
align-items: center;
justify-content: space-between;
flex: 1 1 100%;
height: space(56);
padding: 0 space(12) 0 space(12);
flex: 1 1 auto;
height: auto;
width: auto;
max-width: space(600);
padding: 0 space(12);
}
.config-debug__option-trigger {
flex: 1 1 auto;
}
.config-debug__select-wrapper {
@ -70,14 +83,15 @@
justify-content: flex-start;
flex: 1 1 100%;
width: auto;
max-width: space(600);
height: auto;
padding: 0 space(8);
padding: space(4);
.config-debug__select-label {
@extend %label-sm;
padding-right: space(16);
flex: auto;
width: auto;
width: space(144);
> div {
display: inline;
@ -100,8 +114,14 @@
height: space(40);
border-radius: $border-radius-md;
background-color: $color-white-a5;
&:hover {
cursor: pointer;
&:hover:not(:focus) {
@include border($color-white-a80);
}
&:hover:focus, &:focus {
@include border($color-white-a80);
background-color: $color-white-a20;
}
@ -129,12 +149,17 @@
color: $color-text-dim;
font-weight: 400;
&:hover {
background-color: $color-bg-overlay;
&:hover, &:focus {
background-color: $color-white-a20;
}
&:hover:not(:checked) {
cursor: pointer;
}
&:checked {
color: $color-white;
background-color: $color-white-a5;
}
}
}