forked from adobe/brackets
-
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.
Browse files
Browse the repository at this point in the history
* Using CSSProperties to check if any rule is of type color * === instead of == * Removed unnecessary console log and remaned cursorLine2 to cssPropertyName * Added CSSProperties.json file * Changing include syntax of CSSProperties.json file * Lots of improvements * Renamed CSSProperties.json to ColorProperties.json and removed all non-color styles * Added a default color value which would be returned when the first style of type color is written * Added some comments, used try-catch while including files, checked if cssPropertyName is non-null and renamed some variables * Restored the original color picker logic and modified the logic for checking css rules of type color * Removed the hashPos variable * Writing the default color value to a new css rule of type color and handling the case of empty color string for a css color rule * Modified logic with color value check * Removed 'type: color' from ColorProperties.json and made some small changes * Using the replaceRange function of codeMirror instead of the setLine function
- Loading branch information
1 parent
efd38b9
commit 709b15c
Showing
3 changed files
with
67 additions
and
4 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
src/extensions/default/InlineColorEditor/ColorProperties.json
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"background-color": {"values": ["inherit"]}, | ||
"border-color": {"values": ["inherit"]}, | ||
"border-bottom-color": {"values": ["inherit"]}, | ||
"border-left-color": {"values": ["inherit"]}, | ||
"border-right-color": {"values": ["inherit"]}, | ||
"border-top-color": {"values": ["inherit"]}, | ||
"color": {"values": ["inherit"]}, | ||
"column-rule-color": {"values": []}, | ||
"outline-color": {"values": ["invert", "inherit"]}, | ||
"text-decoration-color": {"values": []}, | ||
"text-emphasis-color": {"values": []} | ||
} |
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