-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Storybook] Configure Aphrodite to Not Append !important to Styles (#…
…2107) ## Summary: Aphrodite appends `!important` to all styling, by default. This is cumbersome for debugging and for writing appropriately defined rulesets. This configuration change causes Aphrodite to NOT append `!important`. This change is limited to our dev environments (i.e. Storybook). Webapp has already implemented this, and handles Perseus styling accordingly. Additionally, this change uncovered a bug that causes an incorrect option to display as blue instead of red. The styling logic was refactored to account for the removal of `!important` and to clarify how styling is applied based upon the widget options. Issue: LEMS-2227 ## Test plan: 1. Open Storybook locally. 2. Inspect any widget with the browser inspect tool. 3. Note the significant lack of `!important` suffixes. ## Test plan for bugfix: 1. Open Storybook locally. 2. Navigate to Perseus > Widgets > Radio > Choice > [Review Mode](http://localhost:6006/?path=/story/perseus-widgets-radio-choice--review-mode) 3. Note that the third item ("Incorrect (selected)") is red, and not blue. Author: mark-fitzgerald Reviewers: jeremywiebe, catandthemachines, mark-fitzgerald Required Reviewers: Approved By: jeremywiebe, catandthemachines Checks: ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x) Pull Request URL: #2107
- Loading branch information
1 parent
b07f293
commit b44c8cb
Showing
8 changed files
with
155 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@khanacademy/perseus-dev-ui": patch | ||
"@khanacademy/perseus": patch | ||
--- | ||
|
||
[Storybook] Configure Aphrodite to Not Append !important to Styles | ||
[Radio] Bugfix - Incorrect choice showing as blue instead of red |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.