Skip to content

Commit da556df

Browse files
authored
[TASK] Deprecate the expansion of shorthand properties (#719)
This is the backport of #714 and all those changes: - #578 - #580 - #579 - #577 - #576 - #575 - #574 - #573 - #572 - #571 - #570 - #569 - #566 - #567 - #558
1 parent d6a4b2a commit da556df

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1616

1717
### Deprecated
1818

19+
- Deprecate the expansion of shorthand properties (#719)
1920
- Deprecate `Parser::setCharset()` and `Parser::getCharset()` (#703)
2021

2122
### Removed

src/CSSList/Document.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ public function getSelectorsBySpecificity($sSpecificitySearch = null)
128128
* Expands all shorthand properties to their long value.
129129
*
130130
* @return void
131+
*
132+
* @deprecated This will be removed without substitution in version 9.0 in #511.
131133
*/
132134
public function expandShorthands()
133135
{
@@ -140,6 +142,8 @@ public function expandShorthands()
140142
* Create shorthands properties whenever possible.
141143
*
142144
* @return void
145+
*
146+
* @deprecated This will be removed without substitution in version 9.0 in #511.
143147
*/
144148
public function createShorthands()
145149
{

src/RuleSet/DeclarationBlock.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ public function getSelectors()
181181
* Splits shorthand declarations (e.g. `margin` or `font`) into their constituent parts.
182182
*
183183
* @return void
184+
*
185+
* @deprecated This will be removed without substitution in version 9.0 in #511.
184186
*/
185187
public function expandShorthands()
186188
{
@@ -196,6 +198,8 @@ public function expandShorthands()
196198
* Creates shorthand declarations (e.g. `margin` or `font`) whenever possible.
197199
*
198200
* @return void
201+
*
202+
* @deprecated This will be removed without substitution in version 9.0 in #511.
199203
*/
200204
public function createShorthands()
201205
{
@@ -215,6 +219,8 @@ public function createShorthands()
215219
* Multiple borders are not yet supported as of 3.
216220
*
217221
* @return void
222+
*
223+
* @deprecated This will be removed without substitution in version 9.0 in #511.
218224
*/
219225
public function expandBorderShorthand()
220226
{
@@ -276,6 +282,8 @@ public function expandBorderShorthand()
276282
* Handles `margin`, `padding`, `border-color`, `border-style` and `border-width`.
277283
*
278284
* @return void
285+
*
286+
* @deprecated This will be removed without substitution in version 9.0 in #511.
279287
*/
280288
public function expandDimensionsShorthand()
281289
{
@@ -336,6 +344,8 @@ public function expandDimensionsShorthand()
336344
* into their constituent parts.
337345
*
338346
* @return void
347+
*
348+
* @deprecated This will be removed without substitution in version 9.0 in #511.
339349
*/
340350
public function expandFontShorthand()
341351
{
@@ -406,6 +416,8 @@ public function expandFontShorthand()
406416
* @see http://www.w3.org/TR/21/colors.html#propdef-background
407417
*
408418
* @return void
419+
*
420+
* @deprecated This will be removed without substitution in version 9.0 in #511.
409421
*/
410422
public function expandBackgroundShorthand()
411423
{
@@ -478,6 +490,8 @@ public function expandBackgroundShorthand()
478490

479491
/**
480492
* @return void
493+
*
494+
* @deprecated This will be removed without substitution in version 9.0 in #511.
481495
*/
482496
public function expandListStyleShorthand()
483497
{
@@ -561,6 +575,8 @@ public function expandListStyleShorthand()
561575
* @param string $sShorthand
562576
*
563577
* @return void
578+
*
579+
* @deprecated This will be removed without substitution in version 9.0 in #511.
564580
*/
565581
public function createShorthandProperties(array $aProperties, $sShorthand)
566582
{
@@ -597,6 +613,8 @@ public function createShorthandProperties(array $aProperties, $sShorthand)
597613

598614
/**
599615
* @return void
616+
*
617+
* @deprecated This will be removed without substitution in version 9.0 in #511.
600618
*/
601619
public function createBackgroundShorthand()
602620
{
@@ -612,6 +630,8 @@ public function createBackgroundShorthand()
612630

613631
/**
614632
* @return void
633+
*
634+
* @deprecated This will be removed without substitution in version 9.0 in #511.
615635
*/
616636
public function createListStyleShorthand()
617637
{
@@ -629,6 +649,8 @@ public function createListStyleShorthand()
629649
* Should be run after `create_dimensions_shorthand`!
630650
*
631651
* @return void
652+
*
653+
* @deprecated This will be removed without substitution in version 9.0 in #511.
632654
*/
633655
public function createBorderShorthand()
634656
{
@@ -646,6 +668,8 @@ public function createBorderShorthand()
646668
* and converts them into shorthand CSS properties.
647669
*
648670
* @return void
671+
*
672+
* @deprecated This will be removed without substitution in version 9.0 in #511.
649673
*/
650674
public function createDimensionsShorthand()
651675
{
@@ -720,6 +744,8 @@ public function createDimensionsShorthand()
720744
* At least `font-size` AND `font-family` must be present in order to create a shorthand declaration.
721745
*
722746
* @return void
747+
*
748+
* @deprecated This will be removed without substitution in version 9.0 in #511.
723749
*/
724750
public function createFontShorthand()
725751
{

0 commit comments

Comments
 (0)