-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web Inspector: Rearrange Gradient Editor to be able to show the color component input fields #2861
Web Inspector: Rearrange Gradient Editor to be able to show the color component input fields #2861
Conversation
Screen.Recording.2022-07-29.at.1.51.50.PM.mov |
|
||
this._colorPicker = new WI.ColorPicker; | ||
this._colorPicker.colorSquare.dimension = 195; | ||
this._colorPicker.enableColorComponentInputs = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops :P
set enableColorComponentInputs(value) | ||
{ | ||
this._enableColorComponentInputs = value; | ||
this._element.classList.toggle("hide-inputs", !this._enableColorComponentInputs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we also get rid of the CSS .color-picker.hide-inputs
?
@@ -24,25 +25,13 @@ | |||
*/ | |||
|
|||
.gradient-editor { | |||
--gradient-editor-controls-width: 237px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style: should only have one space after :
NIT: I usually put CSS variables at the bottom of a declaration so that the actual things that affect style are shown first (similar to how we put member variables at the bottom of a class
in C++)
padding-bottom: 15px; | ||
} | ||
|
||
.gradient-editor.editing-color { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems like we could also get rid of "editing-color"
in the JS too?
} | ||
|
||
.gradient-editor > .gradient-type-select { | ||
width: 237px; | ||
width: var(--gradient-editor-controls-width); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would width: 100%
not work here?
} | ||
|
||
.gradient-editor > .color-picker { | ||
width: 238px; | ||
width: calc(var(--gradient-editor-controls-width) + 1px); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto (:34)
@@ -65,12 +54,11 @@ | |||
} | |||
|
|||
.gradient-editor > .gradient-angle { | |||
width: var(--gradient-editor-controls-width); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto (:34)
f5d0138
to
006b84b
Compare
… component input fields https://bugs.webkit.org/show_bug.cgi?id=243352 rdar://97803004 Reviewed by Devin Rousso. Move the angle control above the color controls so that controls become more specific as you move from top to bottom of the gradient editor. This also affords us the breathing room to show the color component fields at the bottom of the color picker. * Source/WebInspectorUI/UserInterface/Views/ColorPicker.js: (WI.ColorPicker.prototype.async colorInputsWrapperElement): (WI.ColorPicker.prototype._showColorComponentInputs): (WI.ColorPicker.set enableColorComponentInputs): Deleted. * Source/WebInspectorUI/UserInterface/Views/GradientEditor.css: (.gradient-editor): (.gradient-editor > .gradient-type-select): (.gradient-editor > .gradient-slider): (.gradient-editor > .color-picker): (.gradient-editor > .gradient-angle): (.gradient-editor.radial-gradient): Deleted. (.gradient-editor.editing-color): Deleted. (.gradient-editor.radial-gradient.editing-color): Deleted. * Source/WebInspectorUI/UserInterface/Views/GradientEditor.js: (WI.GradientEditor): Canonical link: https://commits.webkit.org/252971@main
006b84b
to
6d528bd
Compare
Committed 252971@main (6d528bd): https://commits.webkit.org/252971@main Reviewed commits have been landed. Closing PR #2861 and removing active labels. |
6d528bd