Skip to content

Commit 9a9a13d

Browse files
committed
refactor(CSS): move context menu styling to src/index.ts
1 parent c275b5b commit 9a9a13d

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

src/index.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,3 +240,23 @@ Blockly.Css.register(`
240240
stroke-width: var(--blockly-selection-width);
241241
}
242242
`);
243+
244+
// Keyboard-nav-specific styling for the context menu.
245+
//
246+
// This should remain in the plugin for the time being because the
247+
// classes selected are currently only defined in the plugin.
248+
Blockly.Css.register(`
249+
.blocklyRTL .blocklyMenuItemContent .blocklyShortcutContainer {
250+
flex-direction: row-reverse;
251+
}
252+
.blocklyMenuItemContent .blocklyShortcutContainer {
253+
width: 100%;
254+
display: flex;
255+
justify-content: space-between;
256+
gap: 16px;
257+
}
258+
.blocklyMenuItemContent .blocklyShortcutContainer .blocklyShortcut {
259+
color: #ccc;
260+
}
261+
`);
262+

test/index.html

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,6 @@
8585
thead {
8686
font-weight: bold;
8787
}
88-
89-
.blocklyRTL .blocklyMenuItemContent .blocklyShortcutContainer {
90-
flex-direction: row-reverse;
91-
}
92-
.blocklyMenuItemContent .blocklyShortcutContainer {
93-
width: 100%;
94-
display: flex;
95-
justify-content: space-between;
96-
gap: 16px;
97-
}
98-
.blocklyMenuItemContent .blocklyShortcutContainer .blocklyShortcut {
99-
color: #ccc;
100-
}
10188
</style>
10289
</head>
10390

0 commit comments

Comments
 (0)