GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: modernize and reenable the colour slider field (#42) · SnoopyMod/scratch-blocks@4f97982

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • blocks_common
    • colour.js
  • core
    • css.js
    • field_colour_slider.js
  • package-lock.json
  • package.json
  • src
    • constants.js
    • index.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎blocks_common/colour.js‎

Copy file name to clipboardExpand all lines: blocks_common/colour.js
+3-8Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,8 @@
2222
* @fileoverview Colour blocks for Blockly.
2323
* @author [email protected] (Neil Fraser)
2424
*/
25-
'use strict';
26-
27-
goog.provide('Blockly.Blocks.colour');
28-
29-
goog.require('Blockly.Blocks');
30-
31-
goog.require('Blockly.constants');
25+
import * as Blockly from 'blockly';
26+
import * as Constants from '../src/constants.js';
3227

3328
/**
3429
* Pick a random colour.
@@ -54,7 +49,7 @@ Blockly.Blocks['colour_picker'] = {
5449
"colour": randomColour()
5550
}
5651
],
57-
"outputShape": Blockly.OUTPUT_SHAPE_ROUND,
52+
"outputShape": Constants.OUTPUT_SHAPE_ROUND,
5853
"output": "Colour"
5954
});
6055
}
Collapse file

‎core/css.js‎

Copy file name to clipboardExpand all lines: core/css.js
+34Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,10 @@ const styles = `
881881
cursor: pointer;
882882
}
883883
884+
.scratchColourPicker {
885+
width: min-content;
886+
}
887+
884888
.scratchColourPickerLabel {
885889
font-family: "Helvetica Neue", Helvetica, sans-serif;
886890
font-size: 0.65rem;
@@ -896,6 +900,36 @@ const styles = `
896900
margin-left: 10px;
897901
}
898902
903+
.scratchColourSlider {
904+
appearance: none;
905+
margin: 8px;
906+
height: 22px;
907+
width: 150px;
908+
position: relative;
909+
outline: none;
910+
border-radius: 11px;
911+
margin-bottom: 20px;
912+
}
913+
914+
/* Combining this and the -moz equivalent below with a comma break the webkit version */
915+
.scratchColourSlider::-webkit-slider-thumb {
916+
appearance: none;
917+
background-color: #fff;
918+
height: 26px;
919+
width: 26px;
920+
border-radius: 100%;
921+
box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.15);
922+
}
923+
924+
.scratchColourSlider::-moz-range-thumb {
925+
appearance: none;
926+
background-color: #fff;
927+
height: 26px;
928+
width: 26px;
929+
border-radius: 100%;
930+
box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.15);
931+
}
932+
899933
.scratchMatrixButtonDiv {
900934
width: 50%;
901935
text-align: center;

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.