Skip to content

Commit 9737eb4

Browse files
authored
Remove long-deprecated khan-exercise.css (#875)
## Summary: Today's the day - `rm khan-exercise.css`. The `khan-exercise.css` stylesheet is a very old set of styles for Perseus. Many of the styles apply to elements that live in webapp and not in Perseus so they don't even belong here. Some are unscoped and so also are just bad practices. Lastly, webapp applies a CSS Reset at the start of it's styles so I suspect most of the unscoped rules are clobbered anyways. The remaining rules will either exist in webapp/mobile already or be for elements that no longer exist. This file just confuses things so I'm removing it today! Issue: --none-- ## Test plan: Compare current PROD with what is available in [the ZND for this PR](https://prod-znd-250227-markfitz-m02.khanacademy.org/). ### Editor: - `code` - Open an article that has CS content, such as ["Public key encryption"](https://www.khanacademy.org/computing/computers-and-internet/xcae6f4a7ff015e7d:online-data-security/xcae6f4a7ff015e7d:data-encryption-techniques/a/public-key-encryption) - Open the editor for the article - Scroll down to "Section 2" - Hover over the tooltip below "Settings:" - CONFIRM: The text "Program.settings()" should look the same in both environments - Preview area (also called "problemarea") - Navigate to [any exercise](https://www.khanacademy.org/internal-courses/test-everything/test-everything-2-without-mastery/te-numeric-input/e/numeric-input-exercise) and open its editor - Verify that content has been added/setup - CONFIRM: The preview area looks the same in both environments ### Widgets & Stuff: - Graphie - Open an exercise or [article with a Graphie widget](https://www.khanacademy.org/internal-courses/test-everything/test-everything-1/te-image/a/image-article) included - CONFIRM: The graph looks the same and is positioned the same in both environments - Hints - Navigate to [any exercise](https://www.khanacademy.org/internal-courses/test-everything/test-everything-2-without-mastery/te-numeric-input/e/numeric-input-exercise) and open its editor - Add at least two hints (scroll to the bottom of the editor page and click the "Add hint" button. - Switch to the Preview screen (click the "Preview" tab at the top of the editor screen). - Somewhere in the preview there should be a link to show hints - click it. - The first hint should show, along with another link to show the next hint. - Keep clicking the "show hint" links until you are seeing the last one. - CONFIRM: The last hint is bold. Author: jeremywiebe Reviewers: handeyeco, catandthemachines, mark-fitzgerald, benchristel Required Reviewers: Approved By: handeyeco, catandthemachines, benchristel Checks: ✅ 8 checks were successful Pull Request URL: #875
1 parent 9dc3c65 commit 9737eb4

File tree

7 files changed

+53
-1524
lines changed

7 files changed

+53
-1524
lines changed

.changeset/lovely-seahorses-hide.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@khanacademy/perseus": minor
3+
---
4+
5+
Remove deprecated khan-exercise.css

packages/perseus-editor/src/item-editor.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,7 @@ class ItemEditor extends React.Component<Props> {
150150
/>
151151
</div>
152152

153-
<div className="perseus-editor-right-cell">
154-
<div id="answer_area" />
155-
</div>
153+
<div className="perseus-editor-right-cell" />
156154
</div>
157155
</div>
158156
);

packages/perseus-editor/src/styles/perseus-editor.less

+21
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232
@correctGreen: #aaffaa;
3333
@ungradedBlue: #d9edf7;
3434

35+
// Pulled over from khan-exercise.css (so that we could delete that file).
36+
code {
37+
font-family: Courier, monospace;
38+
}
39+
3540
.border-box-sizing() {
3641
box-sizing: border-box;
3742
}
@@ -355,6 +360,22 @@
355360
}
356361
}
357362

363+
// Pulled over from khan-exercise.css (so that we could delete that file).
364+
#problemarea {
365+
font-size: 14px;
366+
position: relative;
367+
float: left;
368+
padding-bottom: 38px;
369+
}
370+
#problemarea a:link,
371+
#problemarea input,
372+
#problemarea label, /* HACK(aria): for radios */
373+
#problemarea select {
374+
/* for dropdowns */
375+
position: relative;
376+
z-index: 3; /* interactive-content */
377+
}
378+
358379
//
359380
// Table styles for Editor/Renderer pairs
360381
//

0 commit comments

Comments
 (0)