Skip to content

Commit

Permalink
Increase buttons for accessibility, exclude some
Browse files Browse the repository at this point in the history
  • Loading branch information
Inwerpsel committed Apr 13, 2024
1 parent 0c2096e commit 1b3fbf1
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 57 deletions.
88 changes: 44 additions & 44 deletions docs/demo/dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/demo/dist/bundle.js.map

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions docs/demo/dist/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/demo/dist/main.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/components/Hotkeys.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect, useMemo } from 'react';
import { useEffect } from 'react';
import { useHotkeys } from 'react-hotkeys-hook';
import { get, use } from '../state';
import { flipDebugMode } from './RenderInfo';
Expand Down
6 changes: 3 additions & 3 deletions src/components/inspector/GroupControl.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const GroupControl = props => {
return null;
}

const previewSize = '20px';
const previewSize = '28px';

const isOpen = !!openGroups[group.label];

Expand Down Expand Up @@ -144,7 +144,6 @@ export const GroupControl = props => {
- "{search}"
<button
style={{
fontSize: '7px',
padding: '3px 3px 1px',
position: 'relative',
bottom: '4px',
Expand Down Expand Up @@ -185,8 +184,9 @@ export const GroupControl = props => {
backgroundColor: `${value}`,
backgroundRepeat: `no-repeat`,
backgroundSize: 'cover',
marginTop: '7px',
marginTop: '3px',
marginLeft: '6px',
paddingTop: '3.5px',
fontSize: '14px',
textAlign: 'center',
textShadow: isVar ? 'white 0px 3px' : 'white 2px 2px'
Expand Down
1 change: 0 additions & 1 deletion src/components/properties/ColorControl.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ export const ColorControl = props => {
style={ {
fontSize: '12px',
float: 'right',
width: PREVIEW_SIZE,
opacity: value === 'transparent' ? 1 : .4,
}}
>
Expand Down
1 change: 0 additions & 1 deletion src/components/ui/Palette.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ export function Palette() {
}}
>
<CompactModeButton />
<br/>
{values.length === 0 && <span>Empty<br/></span>}
{compact ? <MiniPalette {...{values, setValues}}/> : <MaxiPalette {...{values, setValues}}/>}
<Tutorial el={Palette} tasks={[
Expand Down
4 changes: 2 additions & 2 deletions src/css/movable.scss
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ $area-speed: .2s;

padding-top: 2px;

width: 24px;
height: 24px;
min-width: 24px !important;
min-height: 24px !important;

top: 0;
right: 0;
Expand Down
11 changes: 10 additions & 1 deletion src/style.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
$accent-color: var(--theme-editor--acent-color, #007cba);
$subtle-grey: rgb(179, 162, 162);
$min-button-height: 44px;

html,
body {
Expand Down Expand Up @@ -28,6 +29,12 @@ $focus-outline: 3px solid rgb(40, 155, 255);
border-radius: 6px;
font-size: 16px;
}

button, input:not([type=checkbox], [type=radio]), select, label:has(>[type=checkbox]) {
min-width: $min-button-height;
min-height: $min-button-height;
}

h4 {
_-- {
white-space: break-spaces;
Expand Down Expand Up @@ -236,6 +243,7 @@ $focus-outline: 3px solid rgb(40, 155, 255);
}

.var-group {
min-height: $min-button-height + 5px;
background: white !important;
border: 1px solid black !important;
margin-bottom: 3px !important;
Expand Down Expand Up @@ -594,6 +602,7 @@ li[data-done=true]:before {
content: "";
color: green;
}

button:disabled {
filter: opacity(.5);
}
}

0 comments on commit 1b3fbf1

Please sign in to comment.