Skip to content
Snippets Groups Projects
gui.css 4.48 KiB
Newer Older
  • Learn to ignore specific revisions
  • @import "../../css/units.css";
    
    Paul Kaplan's avatar
    Paul Kaplan committed
    @import "../../css/colors.css";
    
        height: calc(100% - $menu-bar-height);
    
    carljbowman's avatar
    carljbowman committed
        background-color: $ui-primary;
    
        /*
            Make 2 columns:
            a) for the blocks + workspace panes, and
            b) for combined stage menu + stage + sprite/stage selectors
    
        flex-direction: row;
    
    
        /*
            Stop scrollbar popping in and out from scratch-blocks border issue
            https://github.com/LLK/scratch-gui/issues/318
        */
        overflow-y: hidden;
    
    Paul Kaplan's avatar
    Paul Kaplan committed
    .editor-wrapper {
        flex-basis: 600px;
        flex-grow: 1;
        flex-shrink: 0;
    
        position: relative;
    
    Paul Kaplan's avatar
    Paul Kaplan committed
        display: flex;
        flex-direction: column;
    }
    
    .tab-list {
        height: $stage-menu-height;
    
        width: 250px; /* Match width of the toolbox */
    
    Paul Kaplan's avatar
    Paul Kaplan committed
        display: flex;
        align-items: flex-end;
        flex-shrink: 0;
    
        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    
        font-weight: 500;
        font-size: 0.80rem;
    
    Paul Kaplan's avatar
    Paul Kaplan committed
    
        /* Overrides for react-tabs styling */
    
        margin: 0 !important;
    
    Paul Kaplan's avatar
    Paul Kaplan committed
        border-bottom: 0 !important;
    }
    
    
        flex-grow: 1;
        height: 80%;
    
    carljbowman's avatar
    carljbowman committed
        border: 1px solid $ui-black-transparent;
    
    carljbowman's avatar
    carljbowman committed
        padding: 0.125rem 1.25rem 0;
        font-size: 0.75rem;
    
    carljbowman's avatar
    carljbowman committed
        background-color: $ui-tertiary;
        color: $text-primary-transparent;
    
    
        display: flex;
        justify-content: center;
        align-items: center;
    
    /* Use z-indices to force left-on-top for tabs */
    .tab:nth-of-type(1) {
        margin-left: 0;
        z-index: 3;
    }
    .tab:nth-of-type(2) {
        z-index: 2;
    }
    .tab:nth-of-type(3) {
    
    .tab:hover {
      background-color: $ui-primary;
    }
    
    
    carljbowman's avatar
    carljbowman committed
        background-color: $ui-white;
    
        z-index: 4; /* Make sure selected is always above */
    }
    
    .tab img {
        margin-right: 0.125rem;
    
        filter: grayscale(100%);
    }
    
    .tab.is-selected img {
        filter: none;
    }
    
    /* Tab style overrides from react-tabs */
    .tab.is-selected:after {
        display: none;
    }
    
    .tab.is-selected:focus {
        outline: none;
        box-shadow: none;
    
    carljbowman's avatar
    carljbowman committed
        border-color: $ui-black-transparent;
    
    }
    
    .tab.is-selected:focus:after {
        display: none;
    
    Paul Kaplan's avatar
    Paul Kaplan committed
    .tabs {
        position: relative;
    
    Paul Kaplan's avatar
    Paul Kaplan committed
        display: flex;
        flex-direction: column;
    }
    
    Paul Kaplan's avatar
    Paul Kaplan committed
    .tab-panel {
        position: relative;
        flex-grow: 1;
        flex-shrink: 0;
    
        display: none;
    }
    
    .tab-panel.is-selected {
    
    Paul Kaplan's avatar
    Paul Kaplan committed
        display: flex;
    }
    
    Paul Kaplan's avatar
    Paul Kaplan committed
    .blocks-wrapper {
        flex-grow: 1;
        position: relative;
    
            Only reason we need this, is so .targetWrapper, which holds the selectors,
    
            goes to full vertical height of the window
        */
        display: flex;
    
        flex-direction: column;
    
    
        /* Fix the max width to max stage size (defined in layout_constants.js) + gutter size */
        max-width: calc(480px + calc($space * 2));
    
        padding-left: $space;
        padding-right: $space;
    
    
        /* Hides negative space between edge of rounded corners + container, when selected */
    
        user-select: none;
    
    Paul Kaplan's avatar
    Paul Kaplan committed
        display: flex;
    
        padding-top: $space;
        padding-left: $space;
        padding-right: $space;
    
        /*
    
            For making the sprite-selector a scrollable pane
    
    Steven Dale's avatar
    Steven Dale committed
            @todo: Not working in Safari
    
        /* TODO this also breaks the thermometer menu */
        /* overflow: hidden; */
    
    .extension-button-container {
    
    Eric Rosenbaum's avatar
    Eric Rosenbaum committed
        width: 3.25rem;
    
        height: 3.25rem;
    
        position: absolute;
    
        z-index: 50; /** Force extension button above the ScratchBlocks flyout. */
    
        border: 1px solid $motion-primary;
    
        box-sizing: content-box; /* To match scratch-block vertical toolbox borders */
    
    $fade-out-distance: 15px;
    
    .extension-button-container:before {
        content: "";
        position: absolute;
        top: calc(calc(-1 * $fade-out-distance) - 1px);
        left: -1px;
        background: linear-gradient(rgba(0, 0, 0, 0),rgba(0, 0, 0, 0.15));
        height: $fade-out-distance;
        width: calc(100% + 0.5px);
    }
    
    
    
    .extension-button {
    
        background: none;
        border: none;
        outline: none;
        width: 100%;
        height: 100%;
        cursor: pointer;
    
    
    .extension-button-icon {
        width: 1.75rem;
        height: 1.75rem;
    }
    
    
    .extension-button > div {
        margin-top: 0;