Skip to content

Commit 30f861b

Browse files
authored
Fix Card Icons in Tutorials (microsoft#10436)
Mostly, this fixes microsoft/pxt-arcade#6817. To get the id-card-looking icon in the tutorial view, we add a "card" class to the icon's css, which conflicted with the "card" css class we use for code-cards. I just added a bit of special casing to avoid the conflict. I have also added the teaching-bubble-button class to the buttons in the teaching bubble, because I need to be able to access them specifically to fix microsoft/pxt-arcade#6807. However, the main chunk of that fix will happen in pxt-arcade with microsoft/pxt-arcade#6825
1 parent 146d32d commit 30f861b

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

react-common/components/controls/TeachingBubble.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,21 +389,21 @@ export const TeachingBubble = (props: TeachingBubbleProps) => {
389389
</div>}
390390
<div className="teaching-bubble-navigation">
391391
{hasPrevious && <Button
392-
className="tertiary"
392+
className="tertiary tour-button"
393393
onClick={onBack}
394394
title={backLabel}
395395
ariaLabel={backLabel}
396396
label={backLabel}
397397
/>}
398398
{hasNext && <Button
399-
className="tertiary inverted"
399+
className="tertiary inverted teaching-bubble-button"
400400
onClick={onNext}
401401
title={nextLabel}
402402
ariaLabel={nextLabel}
403403
label={nextLabel}
404404
/>}
405405
{!hasNext && <Button
406-
className="tertiary inverted"
406+
className="tertiary inverted teaching-bubble-button"
407407
onClick={onFinish}
408408
title={finishLabel}
409409
ariaLabel={finishLabel}

theme/semantic-ui-overrides.less

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,15 @@ body.pxt-theme-root {
6565
color: var(--pxt-neutral-foreground1);
6666
}
6767

68-
.ui.card, .ui.cards .card {
68+
i.ui.card.icon {
69+
/*
70+
There is a card class used in tutorials to get an id-card icon, but it conflicts with the
71+
card class used for code cards, so we need some special-casing to avoid conflicts.
72+
*/
73+
border: none;
74+
}
75+
76+
.ui.card:not(.icon), .ui.cards .card:not(.icon) {
6977
background-color: var(--pxt-neutral-background1);
7078
color: var(--pxt-neutral-foreground1);
7179
border-color: var(--pxt-neutral-stencil1);

0 commit comments

Comments
 (0)