Skip to content
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

Manage CSS for Global Styles #20290

Merged
merged 49 commits into from
May 21, 2020
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
bcadc22
Merge try/global-styles-at-blocks
oandregal Feb 18, 2020
61dc5ef
Resolver: add different rules
oandregal Feb 18, 2020
31724ca
Add selectors that targets paragraphs in block quotes
oandregal Feb 18, 2020
0d51cc1
Target site front-end with FSE experiment enabled
oandregal Feb 27, 2020
f0acd43
Take block selector from block.json
oandregal Apr 7, 2020
2ac0fad
Add support for heading block
oandregal Apr 7, 2020
b5180ff
We use current block CSS for demo
oandregal Apr 7, 2020
007a6c0
Revert changes to master
oandregal Apr 7, 2020
e8ebec4
Stop using the wp-gs class
oandregal May 7, 2020
435b002
Rename selector key to __experimentalSelector
oandregal May 7, 2020
2b767ab
Make linter happy
oandregal May 7, 2020
f061744
Extract selectors function and use the styles key for the tree
oandregal May 7, 2020
4eb5606
Emit CSS per block
oandregal May 7, 2020
4413f5e
Add presets to globals
oandregal May 7, 2020
ef573f7
Group: add experimental selector
oandregal May 7, 2020
f0c7fd0
Allow themes that dont declare globals
oandregal May 7, 2020
ed11b06
Revert taking selectors from block.json
oandregal May 12, 2020
4fa8b06
Remove patterns and check that style props adhere do the schema
oandregal May 13, 2020
35228a2
Make function calls symetric
oandregal May 13, 2020
a8dd469
Improve docs
oandregal May 13, 2020
290152f
Add styles for editor via block settings
oandregal May 14, 2020
d2b6c04
Make linter happy
oandregal May 14, 2020
08d3fb0
Maintain current variable name for presets
oandregal May 14, 2020
cb15820
Update comment docs
oandregal May 14, 2020
bcf5e4c
Update comment docs
oandregal May 14, 2020
ed7306d
Do not process blocks that dont have support
oandregal May 14, 2020
045e250
Adapt theme.json processing to new styles key
oandregal May 14, 2020
dda8fa1
Adapt config to expected shape
oandregal May 14, 2020
90843cb
Normalize and adapt to new shape
oandregal May 14, 2020
e99f0c1
Extract normalization function
oandregal May 14, 2020
7e6a2f8
Extract theme preset utility
oandregal May 14, 2020
3e9a2ef
Normalize presets as well
oandregal May 14, 2020
88dfb6e
Add a helper function to merge trees
oandregal May 14, 2020
dc776b2
Improve normalization function
oandregal May 14, 2020
eb21383
Use the helper merge function
oandregal May 14, 2020
8450ae3
Make merge utility take variable number of args
oandregal May 14, 2020
f5df4d0
Fix merge helper
oandregal May 14, 2020
10a9506
Add core color presets
oandregal May 14, 2020
6e9e0f4
Add core presets: font-size, gradient
oandregal May 14, 2020
f05817b
Adapt to new shape
oandregal May 14, 2020
93fb8dd
Fix shape for helper functions
oandregal May 14, 2020
5ca82a9
Rearrange code to optimize for new shape
oandregal May 14, 2020
52c9195
Remove error_log
oandregal May 14, 2020
43c5c91
Naming: use schema instead of shape everywhere
oandregal May 14, 2020
15fbc44
Update phpdoc
oandregal May 14, 2020
c458440
Simplify merge helper function
oandregal May 14, 2020
e484d7b
Use preset format
oandregal May 18, 2020
51c6a51
Consolidate merge mechanics:
oandregal May 19, 2020
26c2910
Improve comments
oandregal May 19, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 38 additions & 4 deletions experimental-default-global-styles.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,41 @@
{
"color": {
"primary": "#52accc",
"background": "white",
"text": "black"
"global": {
"presets": {
oandregal marked this conversation as resolved.
Show resolved Hide resolved
"color": {
"black": "#000000",
oandregal marked this conversation as resolved.
Show resolved Hide resolved
"cyan-bluish-gray": "#abb8c3",
"light-green-cyan": "#7bdcb5",
"luminous-vivid-amber": "#fcb900",
"luminous-vivid-orange": "#ff6900",
"pale-cyan-blue": "#8ed1fc",
"pale-pink": "#f78da7",
"vivid-cyan-blue": "#0693e3",
"vivid-green-cyan": "#00d084",
"vivid-purple": "#9b51e0",
"vivid-red": "#cf2e2e",
"white": "#ffffff"
},
"font-size": {
"small": 13,
"normal": 16,
"medium": 20,
"large": 36,
"huge": 48
},
"gradient": {
"blush-bordeaux": "linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",
"blush-light-purple": "linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",
"cool-to-warm-spectrum": "linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",
"electric-grass": "linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",
"light-green-cyan-to-vivid-green-cyan": "linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",
"luminous-dusk": "linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",
"luminous-vivid-amber-to-luminous-vivid-orange": "linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",
"luminous-vivid-orange-to-vivid-red": "linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",
"midnight": "linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",
"pale-ocean": "linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",
"very-light-gray-to-cyan-bluish-gray": "linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",
"vivid-cyan-blue-to-vivid-purple": "linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)"
}
}
}
}
Loading