forked from MarkBind/markbind
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tweak box styles and revamp box code
The box component has numerous possible styles which relies heavily on highly cascaded classes' styles. This introduces a high degree of coupling between the classes. Also, as a result of the cascading, some classes are rendered but completely overwritten by others, making them redundant. Let's revamp the box template and code to fix this. We centralize the dynamic styles of each element into computed properties, and extract helper methods to make these computed properties as lean as possible. Also, the component was already heavily rewritten prior to this. Hence, let's remove it from the eslint ignore list to achieve consistent code styling. While revamping the code, let's tweak the box styles a little as well: - Add some more padding for the header wrapper to better accomodate markdown taking up a lot of space. - Use the bootstrap 'primary' coloring for definition type boxes, providing better visual diversity. - Separate the applying of colors to the content wrapper and icon wrapper. In so doing, the color attribute applies only to the content (MarkBind#1234), and seamless boxes' content correctly inherit color (MarkBind#1233). - Use the lighter `text-xx` bootstrap classes for seamless boxes' coloring instead which are more suitable against a common white background than the overly dark `alert-xx` classes.
- Loading branch information
Showing
5 changed files
with
431 additions
and
758 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
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 |
---|---|---|
|
@@ -28,4 +28,3 @@ src/Pic.vue | |
src/Question.vue | ||
src/Retriever.vue | ||
src/Thumbnail.vue | ||
src/TipBox.vue |
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.