From c99c867021ae922e6a1afbaf53f3ba8d9105be91 Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Tue, 14 Nov 2017 16:27:42 -0500 Subject: [PATCH] almost finished with preferences styling --- client/modules/IDE/components/Preferences.jsx | 98 ++++++++++--------- client/styles/components/_preferences.scss | 15 ++- 2 files changed, 60 insertions(+), 53 deletions(-) diff --git a/client/modules/IDE/components/Preferences.jsx b/client/modules/IDE/components/Preferences.jsx index eaafe147..7e01f4bd 100644 --- a/client/modules/IDE/components/Preferences.jsx +++ b/client/modules/IDE/components/Preferences.jsx @@ -175,7 +175,7 @@ class Preferences extends React.Component { value="Spaces" checked={!this.props.isTabIndent} /> - + - +

Autosave

@@ -245,45 +245,6 @@ class Preferences extends React.Component {
-
-

Accessible text-based canvas

-
Used with screen reader
-
- { - this.props.setTextOutput(event.target.checked); - }} - aria-label="text output on" - name="text output" - id="text-output-on" - className="preference__radio-button" - value="On" - checked={(this.props.textOutput)} - /> - - { - this.props.setGridOutput(event.target.checked); - }} - aria-label="table output on" - name="table output" - id="table-output-on" - className="preference__radio-button" - value="On" - checked={(this.props.gridOutput)} - /> - - -
-

Lint warning sound

@@ -309,6 +270,56 @@ class Preferences extends React.Component { checked={!this.props.lintWarning} /> + +
+
+
+

Accessible text-based canvas

+
Used with screen reader
+ +
+ { + this.props.setTextOutput(event.target.checked); + }} + aria-label="text output on" + name="text output" + id="text-output-on" + value="On" + checked={(this.props.textOutput)} + /> + + { + this.props.setGridOutput(event.target.checked); + }} + aria-label="table output on" + name="table output" + id="table-output-on" + value="On" + checked={(this.props.gridOutput)} + /> + + { + this.props.setSoundOutput(event.target.checked); + }} + aria-label="sound output on" + name="sound output" + id="sound-output-on" + value="On" + checked={(this.props.soundOutput)} + /> +
@@ -330,13 +341,12 @@ Preferences.propTypes = { setAutosave: PropTypes.func.isRequired, textOutput: PropTypes.bool.isRequired, gridOutput: PropTypes.bool.isRequired, - // soundOutput: PropTypes.bool.isRequired, + soundOutput: PropTypes.bool.isRequired, setTextOutput: PropTypes.func.isRequired, setGridOutput: PropTypes.func.isRequired, - // setSoundOutput: PropTypes.func.isRequired, + setSoundOutput: PropTypes.func.isRequired, lintWarning: PropTypes.bool.isRequired, setLintWarning: PropTypes.func.isRequired, -// openTab: PropTypes.func.isRequired, theme: PropTypes.string.isRequired, serveSecure: PropTypes.bool.isRequired, setServeSecure: PropTypes.func.isRequired, diff --git a/client/styles/components/_preferences.scss b/client/styles/components/_preferences.scss index 15daab85..2ae052fd 100644 --- a/client/styles/components/_preferences.scss +++ b/client/styles/components/_preferences.scss @@ -1,6 +1,6 @@ .preferences { width: 100%; - min-width: #{640 / $base-font-size}rem; + width: #{640 / $base-font-size}rem; max-width: 100%; min-height: #{460 / $base-font-size}rem; max-height: 100%; @@ -166,7 +166,6 @@ } font-size: #{12 / $base-font-size}rem; height: #{20 / $base-font-size}rem; - font-family: Montserrat; width: 100%; margin: 0; padding: 0 #{5 /$base-font-size}rem; @@ -180,7 +179,6 @@ } .preference__add__resource { - font-family: Montserrat; font-size: #{14 / $base-font-size}rem; line-height: 1.43; text-align: left; @@ -205,8 +203,6 @@ display: flex; flex-wrap: wrap; flex-direction: row; - margin-top: #{10 / $base-font-size}rem; - margin-left: #{5 / $base-font-size}rem; } .preference__option:last-child { @@ -220,12 +216,16 @@ color: getThemifyVariable('button-background-hover-color'); } } - margin-top: #{7 / $base-font-size}rem; margin-left: #{30 / $base-font-size}rem; } +.preference__option.preference__whitespace-button { + padding-top: #{8 / $base-font-size}rem; +} + .preference__options { display: flex; + justify-content: center; } .preference__radio-button:checked + .preference__option { @@ -260,6 +260,3 @@ text-align: left; font-size: #{12 / $base-font-size}rem; } - - -