Skip to content
Snippets Groups Projects
Select Git revision
  • 7de2280bd2ce3d3d7197bcab294be194a2d4c892
  • develop default
  • gh-pages
  • frontend-logging
  • feature-sb3-save-restore
  • logging
  • default_testing
  • dependabot/npm_and_yarn/style-loader-1.2.1
  • dependabot/npm_and_yarn/eslint-7.5.0
  • dependabot/npm_and_yarn/js-base64-3.2.4
  • master
  • dependabot/npm_and_yarn/chromedriver-84.0.0
  • hotfix/rever-render-version
  • dependabot/npm_and_yarn/scratch-render-0.1.0-prerelease.20200716193608
  • dependabot/npm_and_yarn/jest-26.1.0
  • dependabot/npm_and_yarn/eslint-plugin-jest-23.18.0
  • dependabot/npm_and_yarn/react-ga-3.1.2
  • dependabot/npm_and_yarn/copy-webpack-plugin-6.0.3
  • dependabot/npm_and_yarn/eslint-plugin-react-7.20.3
  • circle-node-testing
  • dependabot/npm_and_yarn/bowser-2.10.0
  • 0.1.0-prerelease.20200720192905
  • 0.1.0-prerelease.20200720192719
  • 0.1.0-prerelease.20200717030138
  • 0.1.0-prerelease.20200716204544
  • 0.1.0-prerelease.20200716195156
  • 0.1.0-prerelease.20200716152052
  • 0.1.0-prerelease.20200716145944
  • 0.1.0-prerelease.20200715032543
  • 0.1.0-prerelease.20200716194917
  • 0.1.0-prerelease.20200714211936
  • 0.1.0-prerelease.20200714210708
  • 0.1.0-prerelease.20200714205751
  • 0.1.0-prerelease.20200714204339
  • 0.1.0-prerelease.20200714165737
  • 0.1.0-prerelease.20200714162202
  • 0.1.0-prerelease.20200714160943
  • 0.1.0-prerelease.20200711060440
  • 0.1.0-prerelease.20200709205146
  • 0.1.0-prerelease.20200709203105
  • 0.1.0-prerelease.20200709155647
41 results

gui.css

Blame
  • user avatar
    Ben Wheeler authored
    padding and margin changes to make www project page layout work without hacks; hack to position monitors correctly
    7de2280b
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    gui.css 5.25 KiB
    @import "../../css/units.css";
    @import "../../css/colors.css";
    @import "../../css/z-index.css";
    
    .page-wrapper {
        height: 100%;
    }
    
    .body-wrapper {
        height: calc(100% - $menu-bar-height);
        background-color: $ui-primary;
    }
    
    .body-wrapper * {
        box-sizing: border-box;
    }
    
    .flex-wrapper {
        display: flex;
    
        /*
            Make 2 columns:
            a) for the blocks + workspace panes, and
            b) for combined stage menu + stage + sprite/stage selectors
        */
        flex-direction: row;
        height: 100%;
    
        /*
            Stop scrollbar popping in and out from scratch-blocks border issue
            https://github.com/LLK/scratch-gui/issues/318
        */
        overflow-y: hidden;
    }
    
    .editor-wrapper {
        flex-basis: 600px;
        flex-grow: 1;
        flex-shrink: 0;
        position: relative;
    
        display: flex;
        flex-direction: column;
    }
    
    .tab-list {
        height: $stage-menu-height;
        width: 250px; /* Match width of the toolbox */
        display: flex;
        align-items: flex-end;
        flex-shrink: 0;
    
        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
        font-weight: 500;
        font-size: 0.80rem;
    
        /* Overrides for react-tabs styling */
        margin: 0 !important;
        border-bottom: 0 !important;
    }
    
    .tab {
        flex-grow: 1;
        height: 80%;
        margin-bottom: 0;
    
        border-radius: 1rem 1rem 0 0;
        border: 1px solid $ui-black-transparent;
    
        padding: 0.125rem 1.25rem 0;
        font-size: 0.75rem;
    
        background-color: $ui-tertiary;
        color: $text-primary-transparent;
    
        display: flex;
        justify-content: center;
        align-items: center;
    
        user-select: none;
        white-space: nowrap;
    }
    
    [dir="ltr"] .tab {
        margin-left: -0.5rem;
    }
    
    [dir="rtl"] .tab {
        margin-right: -0.5rem;
    }
    
    [dir="ltr"] .tab:nth-of-type(1) {
        margin-left: 0;
    }
    
    [dir="rtl"] .tab:nth-of-type(1) {
        margin-right: 0;
    }
    
    /* Use z-indices to force left-on-top for tabs */
    .tab:nth-of-type(1) {
        z-index: 3;
    }
    .tab:nth-of-type(2) {
        z-index: 2;
    }
    .tab:nth-of-type(3) {
        z-index: 1;
    }
    
    .tab:hover {
      background-color: $ui-primary;
    }
    
    .tab.is-selected {
        height: 90%;
        color: $motion-primary;
        background-color: $ui-white;
        z-index: 4; /* Make sure selected is always above */
    }
    
    .tab img {
        width: 1.375rem;
        filter: grayscale(100%);
    }
    
    [dir="ltr"] .tab img {
        margin-right: 0.125rem;
    }
    
    [dir="rtl"] .tab img {
        margin-left: 0.125rem;
        transform: scaleX(-1);
    }
    
    .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;
        border-color: $ui-black-transparent;
    }
    
    .tab.is-selected:focus:after {
        display: none;
    }
    
    /* Body of the tabs */
    .tabs {
        position: relative;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }
    
    .tab-panel {
        position: relative;
        flex-grow: 1;
        display: none;
    }
    
    .tab-panel.is-selected {
        display: flex;
    }
    
    .blocks-wrapper {
        flex-grow: 1;
        position: relative;
    }
    
    .stage-and-target-wrapper {
        /*
            Makes rows for children:
              1) stage menu
              2) stage
              3) sprite/stage selectors
            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;
        /* pad entire wrapper to the left and right; allow children to fill width */
        padding-left: $space;
        padding-right: $space;
    }
    
    .stage-and-target-wrapper.large {
        /* Fix the max width to max large stage size (defined in layout_constants.js) + gutter size */
        max-width: calc(480px + calc($space * 2));
    }
    
    .stage-and-target-wrapper.large-constrained {
        /* Fix the max width to max largeConstrained stage size (defined in layout_constants.js) + gutter size */
        max-width: calc(408px + calc($space * 2));
    }
    
    .stage-and-target-wrapper.small {
        /* Fix the max width to max small stage size (defined in layout_constants.js) + gutter size */
        max-width: calc(240px + calc($space * 2));
    }
    
    .target-wrapper {
        display: flex;
        flex-grow: 1;
        flex-basis: 0;
    
        padding-top: $space;
        min-height: 0; /* this makes it work in Firefox */
    
        /*
            For making the sprite-selector a scrollable pane
            @todo: Not working in Safari
        */
        /* TODO this also breaks the thermometer menu */
        /* overflow: hidden; */
    }
    
    .extension-button-container {
        width: 3.75rem;
        height: 3.25rem;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: $z-index-extension-button;
        background: $motion-primary;
    
        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;
    }
    
    [dir="rtl"] .extension-button-icon {
        transform: scaleX(-1);
    }
    
    .extension-button > div {
        margin-top: 0;
    }