Skip to content
Snippets Groups Projects
Commit 648aebaa authored by Steven Dale's avatar Steven Dale Committed by GitHub
Browse files

Made UI elements non-selectable (#234)

Affects SpriteSelector Pane, StageSelector Pane, Stage, MenuBar, Libraries Modal, Add/Import buttons, for Chrome, Ffx + Safari on Sierra.

Fixes #162
parent 002dbf2f
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
cursor: pointer; cursor: pointer;
user-select: none;
transition: all 0.15s ease-out; /* @todo: standardize with var */ transition: all 0.15s ease-out; /* @todo: standardize with var */
} }
...@@ -35,7 +36,7 @@ ...@@ -35,7 +36,7 @@
} }
/* Same icon as Sprite Selector Add button, but rotated. /* Same icon as Sprite Selector Add button, but rotated.
TODO: reuse? @todo: reuse?
*/ */
.close-icon { .close-icon {
transform-origin: 50%; transform-origin: 50%;
......
...@@ -64,6 +64,9 @@ ...@@ -64,6 +64,9 @@
.stage-wrapper { .stage-wrapper {
padding-left: $space; padding-left: $space;
padding-right: $space; padding-right: $space;
/* Hides negative space between edge of rounded corners + container, when selected */
user-select: none;
} }
.target-wrapper { .target-wrapper {
......
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
cursor: pointer; cursor: pointer;
text-decoration: none; text-decoration: none;
color: white; color: white;
user-select: none;
} }
.menu-item:hover { .menu-item:hover {
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
bottom: 5%; bottom: 5%;
left: 5%; left: 5%;
border-radius: $space; border-radius: $space;
user-select: none;
} }
.modal-children { .modal-children {
......
...@@ -31,19 +31,14 @@ $form-radius: calc($space / 2); ...@@ -31,19 +31,14 @@ $form-radius: calc($space / 2);
align-items: center; align-items: center;
} }
/* @todo: refactor from descendant selector, to a regular class */
.icon-wrapper { .icon-wrapper {
display: inline-block; display: inline-block;
box-sizing: content-box; box-sizing: content-box;
width: 1.25rem; width: 1.25rem;
height: 1.25rem; height: 1.25rem;
padding: calc($space / 2); padding: calc($space / 2);
cursor: pointer;
outline: none; outline: none;
/* @todo: make this a mixin for all UI text labels */
user-select: none; user-select: none;
cursor: default;
} }
.icon { .icon {
...@@ -131,6 +126,7 @@ $form-radius: calc($space / 2); ...@@ -131,6 +126,7 @@ $form-radius: calc($space / 2);
width: 100%; width: 100%;
height: 1.85rem; height: 1.85rem;
border: 1px solid $form-border; border: 1px solid $form-border;
user-select: none;
outline: none; outline: none;
} }
......
...@@ -37,11 +37,14 @@ ...@@ -37,11 +37,14 @@
.sprite-image { .sprite-image {
margin: auto; margin: auto;
user-select: none;
} }
.sprite-name { .sprite-name {
font-size: 0.625rem; font-size: 0.625rem;
margin: 0.15rem; margin: 0.15rem;
user-select: none;
/* /*
For truncating overflowing text gracefully For truncating overflowing text gracefully
Min-width is for a bug: https://css-tricks.com/flexbox-truncated-text Min-width is for a bug: https://css-tricks.com/flexbox-truncated-text
......
...@@ -58,6 +58,7 @@ $header-height: 2.5rem; /* @todo: half the SpriteInfo area header? */ ...@@ -58,6 +58,7 @@ $header-height: 2.5rem; /* @todo: half the SpriteInfo area header? */
color: #575e75; color: #575e75;
background: #ededed; background: #ededed;
border-radius: 0.25rem; border-radius: 0.25rem;
user-select: none;
} }
.label { .label {
...@@ -66,13 +67,14 @@ $header-height: 2.5rem; /* @todo: half the SpriteInfo area header? */ ...@@ -66,13 +67,14 @@ $header-height: 2.5rem; /* @todo: half the SpriteInfo area header? */
font-size: 0.5rem; font-size: 0.5rem;
font-weight: bold; font-weight: bold;
color: #575e75; color: #575e75;
user-select: none;
} }
$border-width: 2px; $border-width: 2px;
.flex-wrapper { .flex-wrapper {
display: flex; display: flex;
flex-direction: column; /* to make rows */ flex-direction: column; /* makes rows */
align-items: center; align-items: center;
background-color: white; background-color: white;
border-radius: calc($space / 2); border-radius: calc($space / 2);
...@@ -96,4 +98,5 @@ $border-width: 2px; ...@@ -96,4 +98,5 @@ $border-width: 2px;
width: 100%; width: 100%;
border-top-left-radius: calc($space / 2); border-top-left-radius: calc($space / 2);
border-top-right-radius: calc($space / 2); border-top-right-radius: calc($space / 2);
user-select: none;
} }
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
transition: all 0.15s ease-out; /* @todo: standardize with var */ transition: all 0.15s ease-out; /* @todo: standardize with var */
cursor: pointer; cursor: pointer;
user-select: none;
} }
.add-button-wrapper:hover { .add-button-wrapper:hover {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment