diff --git a/client/modules/IDE/components/Preferences.jsx b/client/modules/IDE/components/Preferences.jsx
index f809452e..27eddd7d 100644
--- a/client/modules/IDE/components/Preferences.jsx
+++ b/client/modules/IDE/components/Preferences.jsx
@@ -25,6 +25,12 @@ class Preferences extends React.Component {
if (Number.isNaN(value)) {
value = 16;
}
+ if (value > 36) {
+ value = 36;
+ }
+ if (value < 8) {
+ value = 8;
+ }
this.props.setFontSize(value);
}
@@ -33,6 +39,12 @@ class Preferences extends React.Component {
if (Number.isNaN(value)) {
value = 2;
}
+ if (value > 6) {
+ value = 6;
+ }
+ if (value < 0) {
+ value = 0;
+ }
this.props.setIndentation(value);
}
@@ -106,6 +118,7 @@ class Preferences extends React.Component {
className="preference__minus-button"
onClick={() => this.props.setFontSize(this.props.fontSize - 2)}
aria-label="decrease font size"
+ disabled={this.props.fontSize <= 8}
>
Decrease
@@ -125,6 +138,7 @@ class Preferences extends React.Component {
className="preference__plus-button"
onClick={() => this.props.setFontSize(this.props.fontSize + 2)}
aria-label="increase font size"
+ disabled={this.props.fontSize >= 36}
>
Increase
@@ -136,6 +150,7 @@ class Preferences extends React.Component {
className="preference__minus-button"
onClick={() => this.props.setIndentation(this.props.indentationAmount - 2)}
aria-label="decrease indentation amount"
+ disabled={this.props.indentationAmount <= 0}
>
Decrease
@@ -155,6 +170,7 @@ class Preferences extends React.Component {
className="preference__plus-button"
onClick={() => this.props.setIndentation(this.props.indentationAmount + 2)}
aria-label="increase indentation amount"
+ disabled={this.props.indentationAmount >= 6}
>
Increase
diff --git a/client/styles/abstracts/_placeholders.scss b/client/styles/abstracts/_placeholders.scss
index 9f3a2038..317a0330 100644
--- a/client/styles/abstracts/_placeholders.scss
+++ b/client/styles/abstracts/_placeholders.scss
@@ -128,13 +128,17 @@
& g {
fill: getThemifyVariable('modal-button-color');
}
- &:hover {
+ &:enabled:hover {
background-color: getThemifyVariable('button-background-hover-color');
color: getThemifyVariable('button-hover-color');
& g {
fill: getThemifyVariable('button-hover-color');
}
}
+ &:disabled:hover {
+ cursor: not-allowed;
+ background-color: getThemifyVariable('modal-button-background-color');
+ }
}
}