From f0f0eb55f3dfd3046a3d4cdf18ceab594c1ebdf0 Mon Sep 17 00:00:00 2001 From: Saptak S Date: Sun, 9 Jun 2024 00:40:14 +1000 Subject: [PATCH 1/4] Fixes focus indicators for links and CTAs --- djangoproject/scss/_style.scss | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/djangoproject/scss/_style.scss b/djangoproject/scss/_style.scss index c96fd6baf..689fe23af 100644 --- a/djangoproject/scss/_style.scss +++ b/djangoproject/scss/_style.scss @@ -41,6 +41,10 @@ a { color: var(--text-l10); } + &:focus { + outline: 2px solid currentColor; + } + &:active, &:focus, &:hover { @@ -1229,11 +1233,15 @@ a.cta { font-style: normal; } - &:hover, - &:focus { + &:hover{ background: lighten($green-medium, 4%); } + &:focus { + outline-offset: 2px; + outline-color: var(--primary); + } + &:active { background: darken($green-medium, 2%); } From ad74937b11b026f1973bc5c9909302eb0734de15 Mon Sep 17 00:00:00 2001 From: Saptak S Date: Tue, 11 Jun 2024 20:28:22 +0530 Subject: [PATCH 2/4] Fixes padding on the navigation items Moves the padding from the a element to the li element such that the focus indicators get better rendered. --- djangoproject/scss/_dark-mode.scss | 6 +----- djangoproject/scss/_style.scss | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/djangoproject/scss/_dark-mode.scss b/djangoproject/scss/_dark-mode.scss index 8ce0b24e4..05a5bb543 100644 --- a/djangoproject/scss/_dark-mode.scss +++ b/djangoproject/scss/_dark-mode.scss @@ -278,11 +278,7 @@ html[data-theme="dark"] { border: none; background: transparent; vertical-align: middle; - padding: 20px 10px; - - @include respond-max(768px) { - padding: 0; - } + padding: 0; } .theme-toggle svg { diff --git a/djangoproject/scss/_style.scss b/djangoproject/scss/_style.scss index 689fe23af..6f993f019 100644 --- a/djangoproject/scss/_style.scss +++ b/djangoproject/scss/_style.scss @@ -590,12 +590,14 @@ blockquote { text-transform: uppercase; margin: 0 10px; border-top: 1px solid lighten($green-dark, 5%); + padding: 20px 0px; @include respond-min(768px) { margin: 0; border: 0; float: left; text-align: left; + padding: 20px 10px; } &.active a { @@ -606,7 +608,6 @@ blockquote { a { color: var(--menu); display: block; - padding: 20px 0px; text-decoration: none; &:active, @@ -615,7 +616,6 @@ blockquote { } @include respond-min(768px) { - padding: 20px 10px; } } From a439137cc7de152771a2e9134f2be6a18730d52a Mon Sep 17 00:00:00 2001 From: Saptak S Date: Tue, 11 Jun 2024 20:33:07 +0530 Subject: [PATCH 3/4] Adds focus indicators for buttons same as links --- djangoproject/scss/_dark-mode.scss | 1 + djangoproject/scss/_style.scss | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/djangoproject/scss/_dark-mode.scss b/djangoproject/scss/_dark-mode.scss index 05a5bb543..b5c5ec4cb 100644 --- a/djangoproject/scss/_dark-mode.scss +++ b/djangoproject/scss/_dark-mode.scss @@ -279,6 +279,7 @@ html[data-theme="dark"] { background: transparent; vertical-align: middle; padding: 0; + color: var(--menu); } .theme-toggle svg { diff --git a/djangoproject/scss/_style.scss b/djangoproject/scss/_style.scss index 6f993f019..df6917af6 100644 --- a/djangoproject/scss/_style.scss +++ b/djangoproject/scss/_style.scss @@ -52,6 +52,10 @@ a { } } +button:focus { + outline: 2px solid currentColor; +} + ::selection { // Text Selection Colors background-color: var(--selection); From b8f6f33342965939fc403e4295e9302da6ee1e67 Mon Sep 17 00:00:00 2001 From: Saptak S Date: Thu, 13 Jun 2024 23:52:27 +1000 Subject: [PATCH 4/4] Makes some linting fixes --- djangoproject/scss/_style.scss | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/djangoproject/scss/_style.scss b/djangoproject/scss/_style.scss index df6917af6..967da1bf3 100644 --- a/djangoproject/scss/_style.scss +++ b/djangoproject/scss/_style.scss @@ -618,9 +618,6 @@ blockquote { &:hover { color: var(--secondary-accent); } - - @include respond-min(768px) { - } } span { @@ -1237,7 +1234,7 @@ a.cta { font-style: normal; } - &:hover{ + &:hover { background: lighten($green-medium, 4%); }