mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Editor: add configurable viewport sizes for fluid typography.
Adds options to configure min and max viewport sizes for fluid typography in theme.json settings. Props ramonopoly. Fixes #59048. git-svn-id: https://develop.svn.wordpress.org/trunk@56535 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -7,7 +7,9 @@
|
||||
},
|
||||
"typography": {
|
||||
"fluid": {
|
||||
"minFontSize": "16px"
|
||||
"minFontSize": "16px",
|
||||
"maxViewportWidth": "1200px",
|
||||
"minViewportWidth": "640px"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -622,6 +622,7 @@ class Tests_Block_Supports_Typography extends WP_UnitTestCase {
|
||||
* @ticket 57529
|
||||
* @ticket 58522
|
||||
* @ticket 58523
|
||||
* @ticket 59048
|
||||
*
|
||||
* @covers ::wp_register_typography_support
|
||||
*
|
||||
@@ -692,7 +693,7 @@ class Tests_Block_Supports_Typography extends WP_UnitTestCase {
|
||||
'returns clamp value using custom fluid config' => array(
|
||||
'font_size_value' => '17px',
|
||||
'theme_slug' => 'block-theme-child-with-fluid-typography-config',
|
||||
'expected_output' => 'font-size:clamp(16px, 1rem + ((1vw - 3.2px) * 0.147), 17px);',
|
||||
'expected_output' => 'font-size:clamp(16px, 1rem + ((1vw - 6.4px) * 0.179), 17px);',
|
||||
),
|
||||
'returns value when font size <= custom min font size bound' => array(
|
||||
'font_size_value' => '15px',
|
||||
|
||||
Reference in New Issue
Block a user