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

[TASK] Deprecate the expansion of shorthand properties #719

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).

### Deprecated

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

### Removed
Expand Down
4 changes: 4 additions & 0 deletions src/CSSList/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ public function getSelectorsBySpecificity($sSpecificitySearch = null)
* Expands all shorthand properties to their long value.
*
* @return void
*
* @deprecated This will be removed without substitution in version 9.0 in #511.
*/
public function expandShorthands()
{
Expand All @@ -140,6 +142,8 @@ public function expandShorthands()
* Create shorthands properties whenever possible.
*
* @return void
*
* @deprecated This will be removed without substitution in version 9.0 in #511.
*/
public function createShorthands()
{
Expand Down
26 changes: 26 additions & 0 deletions src/RuleSet/DeclarationBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ public function getSelectors()
* Splits shorthand declarations (e.g. `margin` or `font`) into their constituent parts.
*
* @return void
*
* @deprecated This will be removed without substitution in version 9.0 in #511.
*/
public function expandShorthands()
{
Expand All @@ -196,6 +198,8 @@ public function expandShorthands()
* Creates shorthand declarations (e.g. `margin` or `font`) whenever possible.
*
* @return void
*
* @deprecated This will be removed without substitution in version 9.0 in #511.
*/
public function createShorthands()
{
Expand All @@ -215,6 +219,8 @@ public function createShorthands()
* Multiple borders are not yet supported as of 3.
*
* @return void
*
* @deprecated This will be removed without substitution in version 9.0 in #511.
*/
public function expandBorderShorthand()
{
Expand Down Expand Up @@ -276,6 +282,8 @@ public function expandBorderShorthand()
* Handles `margin`, `padding`, `border-color`, `border-style` and `border-width`.
*
* @return void
*
* @deprecated This will be removed without substitution in version 9.0 in #511.
*/
public function expandDimensionsShorthand()
{
Expand Down Expand Up @@ -336,6 +344,8 @@ public function expandDimensionsShorthand()
* into their constituent parts.
*
* @return void
*
* @deprecated This will be removed without substitution in version 9.0 in #511.
*/
public function expandFontShorthand()
{
Expand Down Expand Up @@ -406,6 +416,8 @@ public function expandFontShorthand()
* @see http://www.w3.org/TR/21/colors.html#propdef-background
*
* @return void
*
* @deprecated This will be removed without substitution in version 9.0 in #511.
*/
public function expandBackgroundShorthand()
{
Expand Down Expand Up @@ -478,6 +490,8 @@ public function expandBackgroundShorthand()

/**
* @return void
*
* @deprecated This will be removed without substitution in version 9.0 in #511.
*/
public function expandListStyleShorthand()
{
Expand Down Expand Up @@ -561,6 +575,8 @@ public function expandListStyleShorthand()
* @param string $sShorthand
*
* @return void
*
* @deprecated This will be removed without substitution in version 9.0 in #511.
*/
public function createShorthandProperties(array $aProperties, $sShorthand)
{
Expand Down Expand Up @@ -597,6 +613,8 @@ public function createShorthandProperties(array $aProperties, $sShorthand)

/**
* @return void
*
* @deprecated This will be removed without substitution in version 9.0 in #511.
*/
public function createBackgroundShorthand()
{
Expand All @@ -612,6 +630,8 @@ public function createBackgroundShorthand()

/**
* @return void
*
* @deprecated This will be removed without substitution in version 9.0 in #511.
*/
public function createListStyleShorthand()
{
Expand All @@ -629,6 +649,8 @@ public function createListStyleShorthand()
* Should be run after `create_dimensions_shorthand`!
*
* @return void
*
* @deprecated This will be removed without substitution in version 9.0 in #511.
*/
public function createBorderShorthand()
{
Expand All @@ -646,6 +668,8 @@ public function createBorderShorthand()
* and converts them into shorthand CSS properties.
*
* @return void
*
* @deprecated This will be removed without substitution in version 9.0 in #511.
*/
public function createDimensionsShorthand()
{
Expand Down Expand Up @@ -720,6 +744,8 @@ public function createDimensionsShorthand()
* At least `font-size` AND `font-family` must be present in order to create a shorthand declaration.
*
* @return void
*
* @deprecated This will be removed without substitution in version 9.0 in #511.
*/
public function createFontShorthand()
{
Expand Down