Skip to content

Commit

Permalink
DDBPRO-20
Browse files Browse the repository at this point in the history
  • Loading branch information
mbuechner committed Jun 17, 2024
1 parent cadc40c commit 4da4c27
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 16 deletions.
33 changes: 26 additions & 7 deletions web/themes/custom/ddbp/src/scss/elements/_form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ input[type='search'] {
-webkit-appearance: none;
}

input[type='name'],
input[type='email'],
input[type='number'],
input[type='password'],
Expand All @@ -52,6 +53,7 @@ select {
@include rsa(height, 50px, 57px);
}

input[type='name'],
input[type='email'],
input[type='password'],
input[type='search'],
Expand All @@ -69,22 +71,30 @@ textarea {

&:focus {
background: $color-white;
border: 1px solid rgba($color-black, 0.42) !important;
box-shadow: none;
border: 1px solid $color-focus !important;
box-shadow: 0 0 20px $color-focus;
outline: none;
}

&:invalid {
box-shadow: none;
}


.form-item--error &, &.error {
border-color: $color-error;
background-color: rgba($color-error, 0.1);
color: $color-error;
}
}

input[type='search'] {
&:focus {
box-shadow: none;
}

@include bp(l) {
&:focus {
box-shadow: 0 0 20px $color-focus;
}
}
}

textarea {
@include spacing(padding, very-small, top bottom);
min-height: 250px;
Expand Down Expand Up @@ -190,6 +200,14 @@ select {
input {
@include spacing(margin, tiny, right);
@include rsa(margin-top, 2px, 3px);

&:focus {
outline: 1px solid $color-focus;
}

&:focus:not(:focus-visible) {
outline: none;
}
}

.description {
Expand All @@ -204,6 +222,7 @@ select {
.form-item-checkbox__label {
display: inline-flex;
align-items: flex-start;
vertical-align: middle;
}

#terms_and_conditions-error {
Expand Down
5 changes: 5 additions & 0 deletions web/themes/custom/ddbp/src/scss/layout/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
@include bp(l) {
display: block;
}

&:focus,
&:focus:not(:focus-visible) {
border-left: 6px solid $color-main !important;
}
}

.sidebar__content-menu {
Expand Down
30 changes: 23 additions & 7 deletions web/themes/custom/ddbp/src/scss/views/_view-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,6 @@
overflow: hidden;
transition: height $duration-medium $easing-default;

// we can't use :focus style on the button (button shadow can't overflow) so we check if parent is focused
&:not(.view-header__link--open):focus-within {
border: 1px solid $color-focus !important;
box-shadow: 0 0 20px $color-focus;
}

&:not(.view-header__link--open):focus-within:has(button:not(:focus-visible)) {
border: 1px solid $color-darken !important;
box-shadow: 0 0 0 transparent;
Expand All @@ -136,7 +130,29 @@
font-size: inherit;
font-weight: font-weight(semi-bold);
line-height: inherit;
}

&:focus {
outline: none;
border: none !important;
box-shadow: none;
}

&:focus:not(:focus-visible) {
border: none !important;
box-shadow: none;
}

&:focus > span {
outline: none;
border: 1px solid $color-focus !important;
box-shadow: 0 0 20px $color-focus;
}

&:focus:not(:focus-visible) > span {
border: none !important;
box-shadow: 0 0 0 transparent;
}
}

button {
// arrow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
<div class="view-header__link-wrapper">
<div class="view-header__link">
<button aria-expanded="false" aria-controls="{{ linkUrlText|clean_class }}">
{{ linkText }}
<span>{{ linkText }}</span>
</button>
<div id="{{ linkUrlText|clean_class }}"
class="view-header__link-select"
aria-hidden="true">
<a href="{{ linkUrl }}">
{{ linkUrlText }}
<span>{{ linkUrlText }}</span>
</a>
</div>
</div>
Expand Down

0 comments on commit 4da4c27

Please sign in to comment.