Skip to content

Commit f90172b

Browse files
authored
fix: update examples to v12 (#2549)
* chore: update all examples to v12 * fix: devsite demo css * fix: update toolbox codelab for v12 * chore: remove keyboard-navigation-codelab sample code * fix: ephemeral focus in pitch field demo
1 parent 6de782f commit f90172b

File tree

76 files changed

+9499
-18155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+9499
-18155
lines changed

codelabs/custom_toolbox/custom_toolbox.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,15 +170,15 @@ and include it in `index.html`:
170170
Copy and paste the following CSS into your `toolbox_style.css` file.
171171
```css
172172
/* Makes our label white. */
173-
.blocklyTreeLabel {
173+
.blocklyToolboxCategoryLabel {
174174
color: white;
175175
}
176176
/* Adds padding around the group of categories and separators. */
177177
.blocklyToolboxContents {
178178
padding: 0.5em;
179179
}
180180
/* Adds space between the categories, rounds the corners and adds space around the label. */
181-
.blocklyTreeRow {
181+
.blocklyToolboxCategory {
182182
padding: 3px;
183183
margin-bottom: 0.5em;
184184
border-radius: 4px;
@@ -209,7 +209,7 @@ Add the following code to `custom_category.js`:
209209
/** @override */
210210
setSelected(isSelected){
211211
// We do not store the label span on the category, so use getElementsByClassName.
212-
var labelDom = this.rowDiv_.getElementsByClassName('blocklyTreeLabel')[0];
212+
var labelDom = this.rowDiv_.getElementsByClassName('blocklyToolboxCategoryLabel')[0];
213213
if (isSelected) {
214214
// Change the background color of the div to white.
215215
this.rowDiv_.style.backgroundColor = 'white';
@@ -274,7 +274,7 @@ In your `toolbox_style.css` file add:
274274
flex-direction: column;
275275
align-items: center;
276276
}
277-
.blocklyTreeRow {
277+
.blocklyToolboxCategory {
278278
height: initial;
279279
}
280280
```
@@ -303,7 +303,7 @@ Your `setSelected` method should look similar to below:
303303
/** @override */
304304
setSelected(isSelected){
305305
// We do not store the label span on the category, so use getElementsByClassName.
306-
var labelDom = this.rowDiv_.getElementsByClassName('blocklyTreeLabel')[0];
306+
var labelDom = this.rowDiv_.getElementsByClassName('blocklyToolboxCategoryLabel')[0];
307307
if (isSelected) {
308308
// Change the background color of the div to white.
309309
this.rowDiv_.style.backgroundColor = 'white';

0 commit comments

Comments
 (0)