diff --git a/package.json b/package.json index 30859aab722..f77861752bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scratch-gui", - "version": "3.4.1", + "version": "3.5.0", "private": true, "description": "MistWarp editor, player, and community site", "author": "MistWarp contributors", @@ -123,7 +123,7 @@ "rotur-sdk": "3.9.1", "scratch-audio": "https://codeload.github.com/MistWarp/scratch-audio/tar.gz/ea64e571175aae4ef91527b4756991c18291a25a", "scratch-blocks": "https://codeload.github.com/MistWarp/scratch-blocks/tar.gz/3df9cb5fbdaf4bc75c737c1f63e4c371fe72e43c", - "scratch-paint": "https://codeload.github.com/MistWarp/scratch-paint/tar.gz/c6f5f47b695e88a602c623269fd2cd71c85c69ef", + "scratch-paint": "https://codeload.github.com/MistWarp/scratch-paint/tar.gz/aa3d33428617b4ee10b8a7ad95b3f448619d49d5", "scratch-render": "https://codeload.github.com/MistWarp/scratch-render/tar.gz/1e01ed65f5334bb453a5dce69329f04bdb63b20b", "scratch-render-fonts": "https://codeload.github.com/PenguinMod/penguinmod-render-fonts/tar.gz/4dda62c707f64505266aa62f7a6cc84f0e5812fd", "scratch-vm": "https://codeload.github.com/MistWarp/scratch-vm/tar.gz/70dda1922f7111d39a7ca84a8960a81039c1e9b3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c8a97227e3f..6ce7061b88c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -224,8 +224,8 @@ importers: specifier: https://codeload.github.com/MistWarp/scratch-blocks/tar.gz/3df9cb5fbdaf4bc75c737c1f63e4c371fe72e43c version: https://codeload.github.com/MistWarp/scratch-blocks/tar.gz/3df9cb5fbdaf4bc75c737c1f63e4c371fe72e43c scratch-paint: - specifier: https://codeload.github.com/MistWarp/scratch-paint/tar.gz/c6f5f47b695e88a602c623269fd2cd71c85c69ef - version: https://codeload.github.com/MistWarp/scratch-paint/tar.gz/c6f5f47b695e88a602c623269fd2cd71c85c69ef(react-dom@16.14.0(react@16.14.0))(react-intl-redux@0.7.0(react-intl@2.9.0(prop-types@15.8.1)(react@16.14.0))(react-redux@5.0.7(react@16.14.0)(redux@3.7.2)))(react-intl@2.9.0(prop-types@15.8.1)(react@16.14.0))(react-popover@0.5.10)(react-redux@5.0.7(react@16.14.0)(redux@3.7.2))(react-responsive@5.0.0(react@16.14.0))(react-style-proptype@3.2.2)(react-tooltip@5.30.1(react-dom@16.14.0(react@16.14.0))(react@16.14.0))(react@16.14.0)(redux@3.7.2)(scratch-render-fonts@https://codeload.github.com/PenguinMod/penguinmod-render-fonts/tar.gz/4dda62c707f64505266aa62f7a6cc84f0e5812fd) + specifier: https://codeload.github.com/MistWarp/scratch-paint/tar.gz/aa3d33428617b4ee10b8a7ad95b3f448619d49d5 + version: https://codeload.github.com/MistWarp/scratch-paint/tar.gz/aa3d33428617b4ee10b8a7ad95b3f448619d49d5(react-dom@16.14.0(react@16.14.0))(react-intl-redux@0.7.0(react-intl@2.9.0(prop-types@15.8.1)(react@16.14.0))(react-redux@5.0.7(react@16.14.0)(redux@3.7.2)))(react-intl@2.9.0(prop-types@15.8.1)(react@16.14.0))(react-popover@0.5.10)(react-redux@5.0.7(react@16.14.0)(redux@3.7.2))(react-responsive@5.0.0(react@16.14.0))(react-style-proptype@3.2.2)(react-tooltip@5.30.1(react-dom@16.14.0(react@16.14.0))(react@16.14.0))(react@16.14.0)(redux@3.7.2)(scratch-render-fonts@https://codeload.github.com/PenguinMod/penguinmod-render-fonts/tar.gz/4dda62c707f64505266aa62f7a6cc84f0e5812fd) scratch-render: specifier: https://codeload.github.com/MistWarp/scratch-render/tar.gz/1e01ed65f5334bb453a5dce69329f04bdb63b20b version: https://codeload.github.com/MistWarp/scratch-render/tar.gz/1e01ed65f5334bb453a5dce69329f04bdb63b20b(scratch-render-fonts@https://codeload.github.com/PenguinMod/penguinmod-render-fonts/tar.gz/4dda62c707f64505266aa62f7a6cc84f0e5812fd)(webpack@4.47.0) @@ -5653,9 +5653,9 @@ packages: resolution: {tarball: https://codeload.github.com/MistWarp/scratch-blocks/tar.gz/3df9cb5fbdaf4bc75c737c1f63e4c371fe72e43c} version: 0.1.0 - scratch-paint@https://codeload.github.com/MistWarp/scratch-paint/tar.gz/c6f5f47b695e88a602c623269fd2cd71c85c69ef: - resolution: {tarball: https://codeload.github.com/MistWarp/scratch-paint/tar.gz/c6f5f47b695e88a602c623269fd2cd71c85c69ef} - version: 0.2.0 + scratch-paint@https://codeload.github.com/MistWarp/scratch-paint/tar.gz/aa3d33428617b4ee10b8a7ad95b3f448619d49d5: + resolution: {tarball: https://codeload.github.com/MistWarp/scratch-paint/tar.gz/aa3d33428617b4ee10b8a7ad95b3f448619d49d5} + version: 0.3.0 peerDependencies: react: ^16.14.0 react-dom: ^16.14.0 @@ -12990,7 +12990,7 @@ snapshots: exports-loader: 0.7.0 imports-loader: 0.8.0 - scratch-paint@https://codeload.github.com/MistWarp/scratch-paint/tar.gz/c6f5f47b695e88a602c623269fd2cd71c85c69ef(react-dom@16.14.0(react@16.14.0))(react-intl-redux@0.7.0(react-intl@2.9.0(prop-types@15.8.1)(react@16.14.0))(react-redux@5.0.7(react@16.14.0)(redux@3.7.2)))(react-intl@2.9.0(prop-types@15.8.1)(react@16.14.0))(react-popover@0.5.10)(react-redux@5.0.7(react@16.14.0)(redux@3.7.2))(react-responsive@5.0.0(react@16.14.0))(react-style-proptype@3.2.2)(react-tooltip@5.30.1(react-dom@16.14.0(react@16.14.0))(react@16.14.0))(react@16.14.0)(redux@3.7.2)(scratch-render-fonts@https://codeload.github.com/PenguinMod/penguinmod-render-fonts/tar.gz/4dda62c707f64505266aa62f7a6cc84f0e5812fd): + scratch-paint@https://codeload.github.com/MistWarp/scratch-paint/tar.gz/aa3d33428617b4ee10b8a7ad95b3f448619d49d5(react-dom@16.14.0(react@16.14.0))(react-intl-redux@0.7.0(react-intl@2.9.0(prop-types@15.8.1)(react@16.14.0))(react-redux@5.0.7(react@16.14.0)(redux@3.7.2)))(react-intl@2.9.0(prop-types@15.8.1)(react@16.14.0))(react-popover@0.5.10)(react-redux@5.0.7(react@16.14.0)(redux@3.7.2))(react-responsive@5.0.0(react@16.14.0))(react-style-proptype@3.2.2)(react-tooltip@5.30.1(react-dom@16.14.0(react@16.14.0))(react@16.14.0))(react@16.14.0)(redux@3.7.2)(scratch-render-fonts@https://codeload.github.com/PenguinMod/penguinmod-render-fonts/tar.gz/4dda62c707f64505266aa62f7a6cc84f0e5812fd): dependencies: '@turbowarp/paper': 0.12.202505131813 classnames: 2.2.5 diff --git a/src/components/asset-panel/asset-panel.css b/src/components/asset-panel/asset-panel.css index 07b6045d6d3..7172c703a59 100644 --- a/src/components/asset-panel/asset-panel.css +++ b/src/components/asset-panel/asset-panel.css @@ -3,6 +3,7 @@ .wrapper { display: flex; + min-height: 0; flex-grow: 1; border: 1px solid $ui-black-transparent; background: $assets-background; @@ -22,11 +23,18 @@ .detail-area { display: flex; + min-width: 0; + min-height: 0; flex-grow: 1; flex-shrink: 1; overflow: visible; } +.detail-area :global([class*="paint-editor_desktop-layout_"] .sa-paintEditorZoomControls-wrapper) { + align-items: center; + gap: .5rem; +} + @media only screen and (max-width: 900px) { .wrapper { flex-direction: column; @@ -36,7 +44,7 @@ .selector { order: 2; - flex: 0 0 5rem; + flex: 0 0 4.5rem; } .detail-area { @@ -63,31 +71,10 @@ .detail-area :global([class*="paint-editor_editor-container-top_"]) { flex: 0 0 auto; - overflow-x: auto; - overflow-y: hidden; - padding-bottom: 0.25rem; - scrollbar-width: thin; - } - - .detail-area :global([class*="paint-editor_editor-container-top_"] > [class*="paint-editor_row_"]) { - width: max-content; - min-width: 100%; } .detail-area :global([class*="paint-editor_top-align-row_"]) { min-width: 0; - min-height: 0; - padding-top: 0.25rem; - } - - .detail-area :global([class*="paint-editor_mode-selector_"]) { - flex: 0 0 2.75rem; - max-width: 2.75rem; - flex-flow: column nowrap; - align-content: stretch; - justify-content: flex-start; - overflow-x: hidden; - overflow-y: auto; } .detail-area :global([class*="paint-editor_controls-container_"]) { @@ -117,20 +104,18 @@ } .detail-area :global([class*="paint-editor_top-align-row_"]) { + min-height: 0; padding-top: 0; } - .detail-area :global([class*="paint-editor_editor-container-top_"] > [class*="paint-editor_row_"]) { - width: 100%; - min-width: 0; - } - .detail-area :global([class*="paint-editor_mode-selector_"]) { width: 100%; min-width: 100%; max-width: none; flex: 0 0 auto; flex-flow: row wrap; + align-content: stretch; + justify-content: flex-start; overflow: visible; } diff --git a/src/components/asset-panel/selector.css b/src/components/asset-panel/selector.css index 34818338c3d..7ddf6ac00e1 100644 --- a/src/components/asset-panel/selector.css +++ b/src/components/asset-panel/selector.css @@ -2,43 +2,33 @@ @import "../../css/units.css"; .wrapper { - width: 150px; + width: 8.5rem; position: relative; display: flex; flex-direction: column; - justify-content: space-between; - background: $ui-tertiary; + background: $ui-secondary; +} + +.sound-wrapper { + width: 11rem; } .new-buttons { position: absolute; + right: 0; bottom: 0; - width: 100%; - + left: 0; display: flex; flex-direction: column; align-items: center; - justify-content: space-around; - padding: 0.75rem 0; + padding: .5rem; color: $accent-text; text-align: center; - background: none; -} - -$fade-out-distance: 100px; - -.new-buttons:before { - content: ""; - position: absolute; - bottom: 0; - left: 0; - right:0; - width: 100%; pointer-events: none; } -.new-buttons > button + button { - margin-top: 0.75rem; +.new-buttons > * { + pointer-events: auto; } .new-button-label { @@ -53,217 +43,115 @@ $fade-out-distance: 100px; overflow-x: hidden; display: flex; flex-direction: column; + padding: .375rem .5rem; + scrollbar-width: thin; +} + +.has-new-button .list-area { + -webkit-mask-image: linear-gradient(to top, transparent 1rem, #000 4.5rem); + mask-image: linear-gradient(to top, transparent 1rem, #000 4.5rem); } -.list-area:after { - /* Make sure there is room to scroll beyond the last tile */ - content: ''; +.has-new-button .list-area::after { + content: ""; display: block; - height: 70px; - width: 100%; - flex-shrink: 0; + flex: 0 0 4.25rem; order: 99999999; } +.sortable { + flex: 0 0 auto; + padding: .125rem 0; +} + .list-item { - width: 5rem; - height: 5rem; - margin: 0.5rem auto; + width: 100%; } -.sound-wrapper .list-item :global([class*="sprite-selector-item_sprite-image_"]) { - max-width: 3.25rem; +.list-area .list-item.placeholder { + background: white; + filter: opacity(15%) brightness(0%); } -@media only screen and (max-width: $full-size-paint) { +@media only screen and (min-width: 901px) and (max-width: $full-size-paint) { .wrapper { - width: 80px; + width: 7rem; } - .list-item { - width: 4rem; + .sound-wrapper { + width: 5rem; + } + + .list-area { + padding: .25rem .375rem; + } + + .sound-wrapper .list-area { + padding: .25rem; + } + + .wrapper:not(.sound-wrapper) .list-item :global([class*="sprite-selector-item_sprite-image-outer_"]) { + height: 3.75rem; } } @media only screen and (max-width: 900px) { - .wrapper { + .wrapper, + .sound-wrapper { width: 100%; - height: 5rem; + height: 4.5rem; flex-direction: row; + align-items: stretch; } .list-area { width: 0; - height: 100%; + height: auto; + flex: 1 1 0; flex-direction: row; + align-items: stretch; + padding: .375rem; overflow-x: auto; overflow-y: hidden; + scrollbar-width: none; } - .list-area:after { - width: 4.5rem; - height: 100%; - } - - .list-item { - flex: 0 0 4rem; - width: 4rem; - height: 4rem; - margin: 0.35rem 0.25rem; - } - - .new-buttons { - right: 0; - bottom: 0; - width: 4.5rem; - height: 100%; - padding: 0.25rem; - background: $ui-tertiary; - border-left: 1px solid $ui-black-transparent; - } - - [dir="rtl"] .new-buttons { - right: auto; - left: 0; - border-right: 1px solid $ui-black-transparent; - border-left: 0; - } -} - -@media only screen and (max-width: 600px) { - .wrapper { - height: 4.75rem; - justify-content: flex-start; + .has-new-button .list-area { + -webkit-mask-image: linear-gradient(to left, transparent 1rem, #000 4.25rem); + mask-image: linear-gradient(to left, transparent 1rem, #000 4.25rem); } - .list-area { - width: 100%; - max-width: none; - flex: 1 1 auto; - align-items: center; - padding-inline-start: .125rem; - -webkit-mask-image: linear-gradient(to left, transparent 2.75rem, #000 6.5rem); - mask-image: linear-gradient(to left, transparent 2.75rem, #000 6.5rem); - scrollbar-width: none; + [dir="rtl"] .has-new-button .list-area { + -webkit-mask-image: linear-gradient(to right, transparent 1rem, #000 4.25rem); + mask-image: linear-gradient(to right, transparent 1rem, #000 4.25rem); } - [dir="rtl"] .list-area { - -webkit-mask-image: linear-gradient(to right, transparent 2.75rem, #000 6.5rem); - mask-image: linear-gradient(to right, transparent 2.75rem, #000 6.5rem); + .has-new-button .list-area::after { + flex: 0 0 3.875rem; } .list-area::-webkit-scrollbar { display: none; } - .list-area:after { - display: block; - width: 5.5rem; - height: 1px; - flex: 0 0 5.5rem; + .sortable { + display: flex; + padding: 0 .125rem; } .list-item { - width: 5.75rem; - height: 4rem; - margin: 0 .1875rem; - flex-basis: 5.75rem; + width: auto; } - .new-buttons, - [dir="rtl"] .new-buttons { + .new-buttons { top: 0; - right: .5rem; - bottom: 0; left: auto; - width: auto; - height: fit-content; - margin-block: auto; - padding: 0; - border: 0; - background: none; + justify-content: center; + padding: 0 .5rem; } [dir="rtl"] .new-buttons { right: auto; - left: .5rem; - } - - .new-buttons :global([class*="action-menu_main-button_"]) { - box-shadow: 0 4px 14px rgba(0, 0, 0, .3); - } - - .new-button-label { - display: none; - } - - .wrapper:not(.sound-wrapper) .list-item :global([class*="sprite-selector-item_sprite-details_"]) { - display: none; - } - - .wrapper:not(.sound-wrapper) .list-item :global([class*="sprite-selector-item_sprite-image_"]) { - max-width: 3.5rem; - max-height: 2.375rem; - } - - .wrapper:not(.sound-wrapper) .list-item :global([class*="sprite-selector-item_sprite-info_"]) { - padding: .125rem .375rem .25rem; - } - - - .sound-wrapper .list-item { - width: 10.5rem; - flex-basis: 10.5rem; - } - - .sound-wrapper .list-item :global([class*="sprite-selector-item_sprite-image_"]) { - max-width: 2.75rem; - } - - .sound-wrapper :global([class*="sprite-selector-item_selection-button_"]) { - display: grid; - box-sizing: border-box; - grid-template-columns: 3rem minmax(0, 1fr); - align-items: center; - padding-right: 3rem; - } - - .sound-wrapper :global([class*="sprite-selector-item_sprite-image-outer_"]) { - height: 100%; - grid-column: 1; - grid-row: 1; - } - - .sound-wrapper :global([class*="sprite-selector-item_sprite-info_"]) { - min-width: 0; - grid-column: 2; - grid-row: 1; - padding: .25rem; - text-align: left; - } - - .sound-wrapper :global([class*="sprite-selector-item_delete-button_"]) { - width: 2.75rem; - height: 2.75rem; - top: 50%; - right: .25rem; - bottom: auto; - transform: translateY(-50%); - } - - [dir="rtl"] .sound-wrapper :global([class*="sprite-selector-item_selection-button_"]) { - padding-right: 0; - padding-left: 3rem; - } - - [dir="rtl"] .sound-wrapper :global([class*="sprite-selector-item_delete-button_"]) { - right: auto; - left: .25rem; + left: 0; } } - - -.list-item.placeholder { - background: white; - filter: opacity(15%) brightness(0%); -} diff --git a/src/components/asset-panel/selector.jsx b/src/components/asset-panel/selector.jsx index 5e11c5de78c..f168532859a 100644 --- a/src/components/asset-panel/selector.jsx +++ b/src/components/asset-panel/selector.jsx @@ -31,6 +31,7 @@ const Selector = props => { } = props; const isRelevantDrag = draggingType === dragType; + const isSoundList = dragType === DragConstants.SOUND; let newButtonSection = null; @@ -54,13 +55,15 @@ const Selector = props => { return ( {items.map((item, index) => ( { editors={item.editors} id={index} index={index} + layout={isSoundList ? 'row' : 'card'} name={item.name} number={index + 1 /* 1-indexed */} selected={index === selectedItemIndex} diff --git a/src/components/gui/gui.css b/src/components/gui/gui.css index 4bcce5c3d70..0d425b57193 100644 --- a/src/components/gui/gui.css +++ b/src/components/gui/gui.css @@ -256,6 +256,7 @@ position: relative; flex-grow: 1; min-width: 0; + min-height: 0; display: flex; flex-direction: column; } @@ -279,10 +280,6 @@ .tab-panel.is-selected { display: flex; -} - -.tabs:has(> .tab-panel.is-selected [class*="sound-editor_editor_"]), -.tab-panel:has([class*="sound-editor_editor_"]) { min-height: 0; } diff --git a/src/components/sprite-selector-item/sprite-selector-item.css b/src/components/sprite-selector-item/sprite-selector-item.css index f9168222d51..2dce732604d 100644 --- a/src/components/sprite-selector-item/sprite-selector-item.css +++ b/src/components/sprite-selector-item/sprite-selector-item.css @@ -176,3 +176,334 @@ [dir="rtl"] .number { right: 0.15rem; } + +.card, +.row { + box-sizing: border-box; + padding: .25rem; + border: 0; + border-radius: .625rem; + background: transparent; + text-align: start; +} + +.card:hover, +.row:hover { + border: 0; + background: $ui-tertiary; +} + +.card.is-selected, +.row.is-selected { + border: 0; + background: $looks-transparent; + box-shadow: none; +} + +.card:global([class*="sa-folders-color-"]):hover, +.row:global([class*="sa-folders-color-"]):hover { + box-shadow: inset 0 0 0 2px $ui-black-transparent; +} + +.card.is-selected:global([class*="sa-folders-color-"]), +.row.is-selected:global([class*="sa-folders-color-"]) { + box-shadow: inset 0 0 0 2px $looks-secondary; +} + +.card .sprite-image, +.row .sprite-image, +.card:hover .sprite-image, +.row:hover .sprite-image { + filter: none; +} + +.card .sprite-info, +.row .sprite-info { + min-width: 0; + border-radius: 0; + background: none; + font-size: .75rem; + line-height: 1.25; + text-align: start; +} + +.card .sprite-name, +.row .sprite-name { + font-weight: 600; +} + +.card .sprite-details, +.row .sprite-details { + margin-top: 0; + color: $text-primary-transparent; + font-size: .6875rem; +} + +.card .number, +.row .number { + color: $text-primary-transparent; + font-size: .6875rem; + font-weight: 700; + line-height: 1.25; +} + +.card .selection-button { + gap: .25rem; +} + +.card .sprite-image-outer { + height: 4.5rem; + flex: 0 0 auto; + overflow: hidden; + border-radius: .5rem; + background: $ui-white; +} + +.card .sprite-image { + max-width: calc(100% - .75rem); + max-height: calc(100% - .75rem); +} + +.card .sprite-info { + padding: 0 .25rem .125rem; +} + +.card .number { + top: .5rem; + padding: 0 .25rem; + border-radius: .25rem; + background: $ui-white-transparent; +} + +[dir="ltr"] .card .number { + left: .5rem; +} + +[dir="rtl"] .card .number { + right: .5rem; + left: auto; +} + +.card .delete-button { + top: .375rem; +} + +[dir="ltr"] .card .delete-button { + right: .375rem; +} + +[dir="rtl"] .card .delete-button { + left: .375rem; +} + +.row .selection-button { + display: grid; + min-height: 2.75rem; + box-sizing: border-box; + grid-template-columns: 1rem 2.75rem minmax(0, 1fr); + align-items: center; + column-gap: .375rem; +} + +[dir="ltr"] .row.is-selected .selection-button { + padding-right: 2.125rem; +} + +[dir="rtl"] .row.is-selected .selection-button { + padding-left: 2.125rem; +} + +.row .number, +[dir="ltr"] .row .number, +[dir="rtl"] .row .number { + position: static; + grid-column: 1; + grid-row: 1; + text-align: center; +} + +.row .sprite-image-outer { + width: 2.75rem; + height: 2.25rem; + grid-column: 2; + grid-row: 1; + border-radius: .5rem; + background: $ui-white; +} + +.row .sprite-image { + max-width: 2.375rem; + max-height: 1.5rem; +} + +.row .sprite-info { + padding: 0; + grid-column: 3; + grid-row: 1; +} + +.row .delete-button { + top: 50%; + transform: translateY(-50%); +} + +[dir="ltr"] .row .delete-button { + right: .375rem; +} + +[dir="rtl"] .row .delete-button { + left: .375rem; +} + +@media only screen and (min-width: 901px) and (max-width: $full-size-paint) { + .row .selection-button, + [dir="ltr"] .row.is-selected .selection-button, + [dir="rtl"] .row.is-selected .selection-button { + display: flex; + min-height: 0; + align-items: stretch; + gap: .125rem; + padding: 0; + } + + .row .sprite-image-outer { + width: 100%; + height: 2.5rem; + flex: 0 0 auto; + } + + .row .sprite-image { + max-width: calc(100% - .5rem); + max-height: 2rem; + } + + .row .sprite-info { + font-size: .6875rem; + } + + .row .sprite-details { + font-size: .625rem; + } + + .row .number, + [dir="ltr"] .row .number, + [dir="rtl"] .row .number { + position: absolute; + top: .375rem; + padding: 0 .1875rem; + border-radius: .25rem; + background: $ui-white; + font-size: .625rem; + } + + [dir="ltr"] .row .number { + left: .375rem; + } + + [dir="rtl"] .row .number { + right: .375rem; + left: auto; + } + + .row .delete-button { + top: .125rem; + transform: none; + } + + [dir="ltr"] .row .delete-button { + right: .125rem; + } + + [dir="rtl"] .row .delete-button { + left: .125rem; + } +} + +@media only screen and (max-width: 900px) { + .card, + .row { + height: 100%; + } + + .sprite-selector-item.card { + width: 4.75rem; + } + + .sprite-selector-item.row { + width: 10.5rem; + } + + .card .selection-button { + gap: .125rem; + } + + .card .sprite-image-outer { + height: 0; + flex: 1 1 0; + } + + .card .sprite-image { + max-width: calc(100% - .375rem); + max-height: calc(100% - .375rem); + } + + .card .sprite-info { + padding: 0 .125rem; + font-size: .6875rem; + } + + .card .sprite-details { + display: none; + } + + .card .number { + top: .375rem; + } + + [dir="ltr"] .card .number { + left: .375rem; + } + + [dir="rtl"] .card .number { + right: .375rem; + } + + .card .delete-button { + top: .125rem; + } + + [dir="ltr"] .card .delete-button { + right: .125rem; + } + + [dir="rtl"] .card .delete-button { + left: .125rem; + } + + .row .selection-button { + height: 100%; + min-height: 0; + } + + .row .delete-button { + width: 2.75rem; + height: 2.75rem; + } + + [dir="ltr"] .row .delete-button { + right: 0; + } + + [dir="rtl"] .row .delete-button { + left: 0; + } + + [dir="ltr"] .row.is-selected .selection-button { + padding-right: 2.5rem; + } + + [dir="rtl"] .row.is-selected .selection-button { + padding-left: 2.5rem; + } +} + diff --git a/src/components/sprite-selector-item/sprite-selector-item.jsx b/src/components/sprite-selector-item/sprite-selector-item.jsx index 57238c19c63..e397af4b364 100644 --- a/src/components/sprite-selector-item/sprite-selector-item.jsx +++ b/src/components/sprite-selector-item/sprite-selector-item.jsx @@ -24,7 +24,9 @@ const SpriteSelectorItem = props => { return (