Refactor config forms LESS to use variables, support empty item lists
Review Request #9074 — Created July 13, 2017 and submitted
This patch refactors the config forms LESS to use defined variables for
colours. These colours were being used in Review Board's account pages
and this change will allow the colours to be imported (instead of the
current hardcoding that occurs).The CSS for config forms lists has been slightly tweaked so that they
have the same top and bottom border. Previously, there was no bottom
border on the list -- it was just theborder-bottom
from the last
element in the list, which uses a different colour from theborder-top
of the entire list.Additionally, support has been added for a new
.config-forms-list-empty
element that is intended to be a sibling of
the.config-forms-list
. It will only be shown when the list has n
children. This is a generally useful pattern for supporting
placeholders that don't have to be dynamically added and removed from
the page. This is a refactor from a pattern I was using in Review
Board.
Tested with an upcoming change for Review Board.
Description | From | Last Updated |
---|---|---|
First sentence in the description is a bit confusing. There's also a typo: "improted" |
chipx86 | |
Can you add screenshots of how this will look in Review Board, before and after? |
chipx86 | |
Alphabetize? |
david | |
Alphabetize? |
david | |
Two border-bottom lines? |
david | |
Alphabetize? |
david |
- Change Summary:
-
Addressed David's issues
- Commit:
-
c19f466af3859e8c1574a0c1c4848df651a628dd
- Diff:
-
Revision 3 (+38 -10)
Checks run (2 succeeded)
- Description:
-
This patch refactors the config forms LESS to use defined variables for
~ colours that are being used in Review Board's account pages so they ~ can be improted directly. It also slightly tweaks the CSS so that the ~ config forms lists will have the same top and bottom border. ~ colours. These colours were being used in Review Board's account pages ~ and this change will allow the colours to be imported (instead of the ~ current hardcoding that occurs). ~ It also adds supports for a new
.config-forms-list-empty
element that~ is intended to be a sibling of the .config-forms-list
. It will only be~ shown when the list has no children. This is a generally useful pattern ~ for supporting placeholders that don't have to be dynamically added and ~ removed from the page. This is a refactor from a pattern I was using in ~ Review Board. ~ The CSS for config forms lists has been slightly tweaked so that they
~ have the same top and bottom border. Previously, there was no bottom ~ border on the list -- it was just the border-bottom
from the last~ element in the list, which uses a different colour from the border-top
~ of the entire list. ~ + Additionally, support has been added for a new
+ .config-forms-list-empty
element that is intended to be a sibling of+ the .config-forms-list
. It will only be shown when the list has n+ children. This is a generally useful pattern for supporting + placeholders that don't have to be dynamically added and removed from + the page. This is a refactor from a pattern I was using in Review + Board. - Added Files: