Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 58 additions & 4 deletions ActiveLogic.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
font-weight: bold;
}

/* Preserve Bootstrap's legend clearance when Quest inserts its hidden
focus target between the legend and the first response. */
.question fieldset > legend + .screen-reader-focus + * {
clear: left;
}

/* this is an answer with a text area...*/
.freeresponse {
display: flex;
Expand Down Expand Up @@ -163,7 +169,7 @@ input[type="text"] {
cursor: pointer;
border: none;
outline: none;
overflow: hidden;
overflow: visible;
padding: 1em;
}

Expand Down Expand Up @@ -206,6 +212,13 @@ input[type="text"] {
box-shadow: 0 0 .75vw #b3b3b3;
}

.quest-grid.table-layout input[type="checkbox"]:focus-visible + .custom-label::before,
.quest-grid.table-layout input[type="radio"]:focus-visible + .custom-label::before {
border-color: #1c5d86;
outline: 3px solid #1c5d86;
outline-offset: 3px;
}

.quest-grid.table-layout input[type="checkbox"]:checked + .custom-label,
.quest-grid.table-layout input[type="radio"]:checked + .custom-label {
border: none;
Expand All @@ -223,8 +236,8 @@ input[type="text"] {
}
}

/* 576px matches the default breakpoint for bootstrap xs */
@media screen and (max-width: 576px) {
/* Bootstrap's small breakpoint starts at 576px; xs ends immediately below it. */
@media screen and (max-width: 575.98px) {
.quest-grid.table-layout {
display: block;
}
Expand Down Expand Up @@ -279,5 +292,46 @@ input[type="text"] {
width: 100%;
height: 100%;
}

input[type="checkbox"]:focus-visible + .custom-label,
input[type="radio"]:focus-visible + .custom-label {
outline: 3px solid #1c5d86;
outline-offset: -6px;
}

input[type="checkbox"]:checked:focus-visible + .custom-label,
input[type="radio"]:checked:focus-visible + .custom-label {
outline-color: #fff;
}
}
}

@media (forced-colors: active) {
.quest-grid.table-layout input[type="checkbox"]:focus-visible + .custom-label::before,
.quest-grid.table-layout input[type="radio"]:focus-visible + .custom-label::before,
.quest-grid.table-layout input[type="checkbox"]:focus-visible + .custom-label,
.quest-grid.table-layout input[type="radio"]:focus-visible + .custom-label {
outline-color: CanvasText;
}
}

.quest-grid.table-layout input[type="checkbox"]:checked + .custom-label::after,
.quest-grid.table-layout input[type="radio"]:checked + .custom-label::after {
forced-color-adjust: none;
background-color: Highlight;
}
}

@media (forced-colors: active) and (max-width: 575.98px) {
.quest-grid.table-layout input[type="checkbox"]:checked + .custom-label,
.quest-grid.table-layout input[type="radio"]:checked + .custom-label {
forced-color-adjust: none;
background-color: Highlight;
border-color: Highlight;
color: HighlightText;
}

.quest-grid.table-layout input[type="checkbox"]:checked:focus-visible + .custom-label,
.quest-grid.table-layout input[type="radio"]:checked:focus-visible + .custom-label {
outline-color: HighlightText;
}
}
62 changes: 58 additions & 4 deletions Default.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ input[type="checkbox"] + label {
white-space: pre-line;
}

/* Preserve Bootstrap's legend clearance when Quest inserts its hidden
focus target between the legend and the first response. */
.question fieldset > legend + .screen-reader-focus + * {
clear: left;
}

/* CSS for grids */
.quest-grid.table-layout {
width: 100%;
Expand Down Expand Up @@ -96,7 +102,7 @@ input[type="checkbox"] + label {
cursor: pointer;
border: none;
outline: none;
overflow: hidden;
overflow: visible;
padding: 1em;
}

Expand Down Expand Up @@ -139,6 +145,13 @@ input[type="checkbox"] + label {
box-shadow: 0 0 .75vw #b3b3b3;
}

.quest-grid.table-layout input[type="checkbox"]:focus-visible + .custom-label::before,
.quest-grid.table-layout input[type="radio"]:focus-visible + .custom-label::before {
border-color: #1c5d86;
outline: 3px solid #1c5d86;
outline-offset: 3px;
}

.quest-grid.table-layout input[type="checkbox"]:checked+.custom-label,
.quest-grid.table-layout input[type="radio"]:checked+.custom-label {
border: none;
Expand All @@ -156,8 +169,8 @@ input[type="checkbox"] + label {
}
}

/* 576px matches the default breakpoint for bootstrap xs */
@media screen and (max-width: 576px) {
/* Bootstrap's small breakpoint starts at 576px; xs ends immediately below it. */
@media screen and (max-width: 575.98px) {
.quest-grid.table-layout {
display: block;
}
Expand Down Expand Up @@ -212,5 +225,46 @@ input[type="checkbox"] + label {
width: 100%;
height: 100%;
}

input[type="checkbox"]:focus-visible + .custom-label,
input[type="radio"]:focus-visible + .custom-label {
outline: 3px solid #1c5d86;
outline-offset: -6px;
}

input[type="checkbox"]:checked:focus-visible + .custom-label,
input[type="radio"]:checked:focus-visible + .custom-label {
outline-color: #fff;
}
}
}

@media (forced-colors: active) {
.quest-grid.table-layout input[type="checkbox"]:focus-visible + .custom-label::before,
.quest-grid.table-layout input[type="radio"]:focus-visible + .custom-label::before,
.quest-grid.table-layout input[type="checkbox"]:focus-visible + .custom-label,
.quest-grid.table-layout input[type="radio"]:focus-visible + .custom-label {
outline-color: CanvasText;
}

.quest-grid.table-layout input[type="checkbox"]:checked + .custom-label::after,
.quest-grid.table-layout input[type="radio"]:checked + .custom-label::after {
forced-color-adjust: none;
background-color: Highlight;
}
}

@media (forced-colors: active) and (max-width: 575.98px) {
.quest-grid.table-layout input[type="checkbox"]:checked + .custom-label,
.quest-grid.table-layout input[type="radio"]:checked + .custom-label {
forced-color-adjust: none;
background-color: Highlight;
border-color: Highlight;
color: HighlightText;
}
}

.quest-grid.table-layout input[type="checkbox"]:checked:focus-visible + .custom-label,
.quest-grid.table-layout input[type="radio"]:checked:focus-visible + .custom-label {
outline-color: HighlightText;
}
}
11 changes: 11 additions & 0 deletions Quest.css
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,17 @@ input[type="checkbox"].form-check-input{
text-decoration: none;
}

.question .popover-dismiss:focus-visible {
outline: 3px solid #1c5d86;
outline-offset: 2px;
}

@media (forced-colors: active) {
.question .popover-dismiss:focus-visible {
outline-color: CanvasText;
}
}

.popover-header {
background-color: #f8f9fa;
border-bottom: 1px solid #e9ecef;
Expand Down
39 changes: 33 additions & 6 deletions Style1.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,39 @@ input.styling[type="radio"] {
display: inline;
}

input[type="radio"] {
display: none;
}

input[type="checkbox"] {
display: none;
.question input[type="radio"],
.question input[type="checkbox"] {
position: absolute;
opacity: 0;
width: 1px;
height: 1px;
}

.question .response > input[type="radio"]:focus-visible + label:not(.custom-label),
.question .response > input[type="checkbox"]:focus-visible + label:not(.custom-label) {
outline: 3px solid #1c5d86;
outline-offset: 2px;
}

.question .popover-dismiss:focus-visible {
outline: 3px solid #1c5d86;
outline-offset: 2px;
}

@media (forced-colors: active) {
.question .response > input[type="radio"]:focus-visible + label:not(.custom-label),
.question .response > input[type="checkbox"]:focus-visible + label:not(.custom-label),
.question .popover-dismiss:focus-visible {
outline-color: CanvasText;
}

.question .response > input[type="radio"]:checked + label:not(.custom-label),
.question .response > input[type="checkbox"]:checked + label:not(.custom-label) {
forced-color-adjust: none;
background-color: Highlight;
border-color: Highlight;
color: HighlightText;
}
}

.show-button {
Expand Down
Loading
Loading