-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Move the dropdown field into the dropdown div. #3122
Move the dropdown field into the dropdown div. #3122
Conversation
|
||
'.blocklyDropDownDiv .goog-menuitem-highlight,', | ||
'.blocklyDropDownDiv .goog-menuitem-hover {', | ||
'background-color: rgba(0,0,0,.2);', |
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.
We don't use goog-menuitem-hover
core/dropdowndiv.js
Outdated
@@ -185,10 +201,16 @@ Blockly.DropDownDiv.clearContent = function() { | |||
* Set the colour for the drop-down. | |||
* @param {string} backgroundColour Any CSS colour for the background. | |||
* @param {string} borderColour Any CSS colour for the border. | |||
* @param {boolean=} opt_invertedText Whether or not the text color should be |
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.
Why opt_invertedText
instead of opt_className
?
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.
I was hoping to just provide the two options, and that was a way to indicate whether or not the color needs inverted text or not.
I will leave this out of this PR though, and think about it a little more.
The basics
The details
Resolves
Last (dropdown) field still using the widget div.
Proposed Changes
Render the dropdown field in the dropdown div.
Add default colors to the dropdown div, so that each owner that doesn't care about setting the color doesn't need to set default colors. (We should think about how this ties into themes).
Added support for inverted text (white text with colored background), by default resorting to black text for the white default background.
Reason for Changes
Test Coverage
Tested playground.
Tested on:
Documentation
Additional Information