You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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
0 commit comments