Sha256: 4aeea2e661237dbef19e78a5dd1c75812264d20ea3ac620bb2c7f5e5b8420310

Contents?: true

Size: 1.08 KB

Versions: 20

Compression:

Stored size: 1.08 KB

Contents

<%
  require 'smalruby_editor'
  colors = SmalrubyEditor::COLORS
%>
div.blocklyTreeRoot {
    padding: 0;

    .blocklyTreeRow {
        margin-bottom: 1px;
        padding-top: 1px;
        padding-bottom: 1px;
        color: white;

        span.blocklyTreeIcon, span.blocklyTreeLabel {
          font-size: 14px;
        }
    }

    .blocklyTreeRow.blocklyTreeSelected {
        font-weight: bold;
    }
}

<%
  hues = [
    colors[:motion],
    colors[:looks],
    colors[:sound],
    colors[:pen],
    colors[:data],
    colors[:events],
    colors[:control],
    colors[:sensing],
    colors[:operators],
    colors[:etc],
  ]

  colors = hues.map { |h|
    [SmalrubyEditor.hsv_to_rgb(h, 100, 80),
     SmalrubyEditor.hsv_to_rgb(h, 100, 100)]
  }

  colors.each.with_index(1) do |(color, active_color), index|
%>
div.blocklyTreeRoot > div:nth-child(2) > div:nth-child(<%= index %>)[aria-level="1"] {
    .blocklyTreeRow {
        background-color: #<%= color %> !important;
    }

    .blocklyTreeRow.blocklyTreeSelected {
        background-color: #<%= active_color %> !important;
    }
}
<% end %>

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
smalruby-editor-0.4.1-x86-mingw32 app/assets/stylesheets/toolbox.css.scss.erb
smalruby-editor-0.4.2-x86-mingw32 app/assets/stylesheets/toolbox.css.scss.erb
smalruby-editor-0.4.2 app/assets/stylesheets/toolbox.css.scss.erb
smalruby-editor-0.4.1 app/assets/stylesheets/toolbox.css.scss.erb
smalruby-editor-0.4.0-x86-mingw32 app/assets/stylesheets/toolbox.css.scss.erb
smalruby-editor-0.4.0 app/assets/stylesheets/toolbox.css.scss.erb
smalruby-editor-0.3.5-x86-mingw32 app/assets/stylesheets/toolbox.css.scss.erb
smalruby-editor-0.3.5 app/assets/stylesheets/toolbox.css.scss.erb
smalruby-editor-0.3.4-x86-mingw32 app/assets/stylesheets/toolbox.css.scss.erb
smalruby-editor-0.3.4 app/assets/stylesheets/toolbox.css.scss.erb
smalruby-editor-0.3.3-x86-mingw32 app/assets/stylesheets/toolbox.css.scss.erb
smalruby-editor-0.3.3 app/assets/stylesheets/toolbox.css.scss.erb
smalruby-editor-0.3.2-x86-mingw32 app/assets/stylesheets/toolbox.css.scss.erb
smalruby-editor-0.3.2 app/assets/stylesheets/toolbox.css.scss.erb
smalruby-editor-0.3.1-x86-mingw32 app/assets/stylesheets/toolbox.css.scss.erb
smalruby-editor-0.3.1 app/assets/stylesheets/toolbox.css.scss.erb
smalruby-editor-0.3.0-x86-mingw32 app/assets/stylesheets/toolbox.css.scss.erb
smalruby-editor-0.3.0 app/assets/stylesheets/toolbox.css.scss.erb
smalruby-editor-0.2.7-x86-mingw32 app/assets/stylesheets/toolbox.css.scss.erb
smalruby-editor-0.2.7 app/assets/stylesheets/toolbox.css.scss.erb