.toolarea-shade { position: fixed; z-index: 1000; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.6); display: none; &.open { display: block; } +desktop() { &.open { display: none; } } } [data-component='ToolAreaButton'] { &.on { right: 80%; } } [data-component='ToolArea'] { &.open { width: 80%; } .toolarea-shade.open { display: block; } } @media (min-width: 600px) { [data-component='ToolAreaButton'] { &.on { right: 60%; } } [data-component='ToolArea'] { &.open { width: 60%; } } } @media (min-width: 900px) { [data-component='ToolAreaButton'] { &.on { right: 40%; } } [data-component='ToolArea'] { &.open { width: 40%; } } } @media (min-width: 1500px) { [data-component='ToolAreaButton'] { &.on { right: 25%; } } [data-component='ToolArea'] { &.open { width: 25%; } } } [data-component='ToolAreaButton'] { position: absolute; z-index: 1020; right: 0; height: 36px; width: 36px; margin: 2rem; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: right 0.3s; > .button { flex: 0 0 auto; margin: 4px 0; background-position: center; background-size: 75%; background-repeat: no-repeat; background-color: rgba(#fff, 0.3); cursor: pointer; transition-property: opacity, background-color; transition-duration: 0.15s; border-radius: 100%; +desktop() { height: 36px; width: 36px; } +mobile() { height: 32px; width: 32px; } &.on { background-color: rgba(#fff, 0.7); } &.disabled { pointer-events: none; opacity: 0.5; } &.toolarea-button { background-image: url('/resources/images/icon_tool_area_white.svg'); &.on { background-image: url('/resources/images/icon_tool_area_black.svg'); } } } > .badge { border-radius: 50%; font-size: 1rem; background: #b12525; color: #fff; text-align: center; margin-top: -8px; line-height: 1rem; margin-right: -8px; position: absolute; padding: 0.2rem 0.4rem; top: 0; right: 0; &.long { border-radius: 25% / 50%; } } } [data-component='ToolArea'] { width: 100%; height: 100%; color: #000; position: fixed; width: 0; top: 0; right: 0; height: 100%; background: #fff; transition: width 0.3s; z-index: 1010; display: flex; flex-direction: column; border-left: 1px solid #222; > .tab-headers { display: flex; background: #ddd; flex-shrink: 0; > .tab-header { flex-grow: 1; cursor: pointer; padding: 1rem; font-size: 1.2rem; text-align: center; &.checked { background: #fff; border-radius: 1vmin 1vmin 0vmin 0vmin; box-shadow: 0.5vmin 0vmin 1vmin -0.5vmin #aaa; } > .badge { padding: 0.2rem 0.6rem; text-align: center; font-weight: 300; font-size: 1rem; color: #fff; background-color: #b12525; border-radius: 2px; margin-left: 1vmin; } } } > .tab { flex-grow: 1; padding: 0.5rem; display: flex; flex-direction: column; } }