Skip to content

Commit d856807

Browse files
authored
add display css variable for html preview link (#1412)
Adds the `display` property to the `a.htmlrunner-link` class for `HtmlRunner`. This is to enable / disable the HTML preview link. The link is currently broken in CCP due to the use of relative link for the preview and we would like to disable it until it gets fixed (hopefully in the issue RaspberryPiFoundation/digital-editor-issues#1264) Before: <img width="600" alt="Screenshot 2026-03-31 at 11 39 23" src="https://github.com/user-attachments/assets/f002c4bb-9c93-45f5-a32d-f98b89bc75e4" /> <img width="500" alt="Screenshot 2026-03-31 at 11 51 24" src="https://github.com/user-attachments/assets/39800ecb-1424-48d0-81d9-abac85d4e34f" /> After with `--editor-htmlrunner-link-display: none`: <img width="600" alt="Screenshot 2026-03-31 at 11 39 46" src="https://github.com/user-attachments/assets/78a3f2cc-642e-45e3-b838-dd455e9d62e3" /> <img width="500" alt="Screenshot 2026-03-31 at 11 51 55" src="https://github.com/user-attachments/assets/a3e5bdb7-07ee-4289-9579-b3f639fea664" />
1 parent 3aa72aa commit d856807

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/assets/stylesheets/HtmlRunner.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
inline-size: 100%;
99
}
1010

11-
.htmlrunner-link {
11+
a.htmlrunner-link {
12+
display: var(--editor-htmlrunner-link-display, inline-flex);
1213
margin-inline-start: auto;
1314
}
1415

0 commit comments

Comments
 (0)