diff --git a/client/modules/IDE/components/Preferences.js b/client/modules/IDE/components/Preferences.js index a705a098..0cf77843 100644 --- a/client/modules/IDE/components/Preferences.js +++ b/client/modules/IDE/components/Preferences.js @@ -38,38 +38,7 @@ class Preferences extends React.Component { preferences: true, 'preferences--selected': this.props.isVisible }); - let preferencesTabOptionClass = classNames({ - preference__option: true, - 'preference__option--selected': this.props.isTabIndent - }); - let preferencesSpaceOptionClass = classNames({ - preference__option: true, - 'preference__option--selected': !this.props.isTabIndent - }); - let autosaveOnClass = classNames({ - preference__option: true, - 'preference__option--selected': this.props.autosave - }); - let autosaveOffClass = classNames({ - preference__option: true, - 'preference__option--selected': !this.props.autosave - }); - let lintWarningOnClass = classNames({ - preference__option: true, - 'preference__option--selected': this.props.lintWarning - }); - let lintWarningOffClass = classNames({ - preference__option: true, - 'preference__option--selected': !this.props.lintWarning - }); - let textOutputOnClass = classNames({ - preference__option: true, - 'preference__option--selected': this.props.textOutput - }); - let textOutputOffClass = classNames({ - preference__option: true, - 'preference__option--selected': !this.props.textOutput - }); + return (
@@ -143,54 +112,112 @@ class Preferences extends React.Component {
Increase
- - + + + +

Autosave

- - + name="autosave" + id="autosave-off" + className="preference__radio-button" + value="Off" + checked={!this.props.autosave} + /> +

Lint Warning Sound

- - + name="lint warning" + id="lint-warning-off" + className="preference__radio-button" + value="Off" + checked={!this.props.lintWarning} + /> +

Accessible Text-based Canvas

Used with screen reader
+
- - + name="text output" + id="text-output-off" + className="preference__radio-button" + value="Off" + checked={!this.props.textOutput} + /> + +
diff --git a/client/modules/IDE/components/Toolbar.js b/client/modules/IDE/components/Toolbar.js index 79226d70..74e78b6a 100644 --- a/client/modules/IDE/components/Toolbar.js +++ b/client/modules/IDE/components/Toolbar.js @@ -51,15 +51,15 @@ class Toolbar extends React.Component { return (
p5js Logo - +
); diff --git a/client/styles/abstracts/_placeholders.scss b/client/styles/abstracts/_placeholders.scss index aa8c9f39..dadf6267 100644 --- a/client/styles/abstracts/_placeholders.scss +++ b/client/styles/abstracts/_placeholders.scss @@ -104,9 +104,6 @@ &:hover { color: $light-primary-text-color; } - &--selected { - color: $light-primary-text-color; - } } %modal { diff --git a/client/styles/components/_preferences.scss b/client/styles/components/_preferences.scss index 06ca4b70..d33c355c 100644 --- a/client/styles/components/_preferences.scss +++ b/client/styles/components/_preferences.scss @@ -81,13 +81,15 @@ padding-left: #{28 / $base-font-size}rem; } +.preference__radio-button { + @extend %hidden-element; +} + .preference__option { @extend %preference-option; list-style-type: none; padding: 0; - &--selected { - @extend %preference-option--selected; - } + color: $light-inactive-text-color; } .preference__options { @@ -96,6 +98,10 @@ width: #{70 / $base-font-size}rem; } +.preference__radio-button:checked + .preference__option { + color: $light-primary-text-color; +} + .preference--hidden { @extend %hidden-element; }