Skip to content

Gradients in background styles are no longer ignored and are properly normalized.#19797

Merged
Mati365 merged 29 commits intomasterfrom
ck/19787
Mar 10, 2026
Merged

Gradients in background styles are no longer ignored and are properly normalized.#19797
Mati365 merged 29 commits intomasterfrom
ck/19787

Conversation

@Mati365
Copy link
Copy Markdown
Member

@Mati365 Mati365 commented Feb 17, 2026

🚀 Summary

Gradients in background styles are no longer ignored and are properly normalized.

obraz

It's now possible to preserve more complex background properties:

background: linear-gradient(90deg, rgba(161, 29, 125, 0.55) 0%, rgba(24, 33, 104, 0.75) 100%), linear-gradient(180deg, rgba(255, 200, 0, 0.4) 0%, rgba(255, 100, 0, 0.6) 100%) center #f00 repeat-y fixed

was previously downcasted to:

background-color:#f00;

it's now downcasted to:

background: linear-gradient(90deg, rgba(161, 29, 125, 0.55) 0%, rgba(24, 33, 104, 0.75) 100%), linear-gradient(180deg, rgba(255, 200, 0, 0.4) 0%, rgba(255, 100, 0, 0.6) 100%) center repeat-y fixed #f00;

📌 Related issues


🧾 Checklists

Use the following checklists to ensure important areas were not overlooked.
This does not apply to feature-branch merges.
If an item is not relevant to this type of change, simply leave it unchecked.

Author checklist

  • Is the changelog entry intentionally omitted?
  • Is the change backward-compatible?
  • Have you considered the impact on different editor setups and core interactions? (e.g., classic/inline/multi-root/many editors, typing, selection, paste, tables, lists, images, collaboration, pagination)
  • Has the change been manually verified in the relevant setups?
  • Does this change affect any of the above?
  • Is performance impacted?
  • Is accessibility affected?
  • Have tests been added that fail without this change (against regression)?
  • Have the API documentation, guides, feature digest, and related feature sections been updated where needed?
  • Have metadata files (ckeditor5-metadata.json) been updated if needed?
  • Are there any changes the team should be informed about (e.g. architectural, difficult to revert in future versions or having impact on other features)?
  • Were these changes documented (in Logbook)?

Reviewer checklist

  • PR description explains the changes and the chosen approach (especially when performance, API, or UX is affected).
  • The changelog entry is clear, user‑ or integrator-facing, and it describes any breaking changes.
  • All new external dependencies have been approved and mentioned in LICENSE.md (if any).
  • All human-readable, translateable strings in this PR been introduced using t() (if any).
  • I manually verified the change (e.g., in manual tests or documentation).
  • The target branch is correct.

@Mati365 Mati365 requested a review from niegowski February 17, 2026 12:20
Comment thread packages/ckeditor5-engine/tests/view/styles/background.js Outdated
Comment thread packages/ckeditor5-engine/src/view/styles/background.ts Outdated
Comment thread packages/ckeditor5-engine/src/view/styles/background.ts Outdated
@Mati365 Mati365 requested a review from niegowski March 5, 2026 12:46
Copy link
Copy Markdown
Contributor

@niegowski niegowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial review.

Comment thread .changelog/20260305132634_ck_19787.md
Comment thread packages/ckeditor5-font/tests/manual/font-color.html
Comment thread packages/ckeditor5-font/tests/manual/font-color-picker.html
Comment thread packages/ckeditor5-font/tests/manual/tickets/15580/1.html
Comment thread packages/ckeditor5-font/docs/_snippets/features/font.html
Comment thread packages/ckeditor5-engine/src/view/styles/background.ts
Comment thread packages/ckeditor5-engine/src/view/styles/background.ts Outdated
Comment thread packages/ckeditor5-engine/src/view/styles/background.ts Outdated
Comment thread packages/ckeditor5-engine/src/view/styles/background.ts Outdated
Comment thread packages/ckeditor5-engine/src/view/styles/background.ts Outdated
Comment thread packages/ckeditor5-engine/tests/view/styles/background.js Outdated
Comment thread packages/ckeditor5-engine/tests/view/styles/background.js Outdated
Comment thread packages/ckeditor5-engine/tests/view/styles/background.js Outdated
Comment thread packages/ckeditor5-engine/src/view/styles/padding.ts
Comment thread packages/ckeditor5-engine/src/view/styles/margin.ts
Comment thread packages/ckeditor5-engine/src/view/styles/background.ts Outdated
Comment thread packages/ckeditor5-engine/src/view/styles/background.ts Outdated
Comment thread packages/ckeditor5-engine/src/view/styles/background.ts Outdated
Comment thread packages/ckeditor5-engine/src/view/styles/background.ts Outdated
Comment thread packages/ckeditor5-engine/src/view/styles/background.ts Outdated
@Mati365 Mati365 requested a review from niegowski March 8, 2026 10:10
@Mati365 Mati365 requested review from mmotyczynska and removed request for niegowski March 9, 2026 09:12
@Mati365 Mati365 dismissed niegowski’s stale review March 9, 2026 09:13

I asked Marta for CR

Copy link
Copy Markdown
Contributor

@mmotyczynska mmotyczynska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍
After going through the code and tests, I mostly focused on trying different scenarios. It was already reviewed a few times, and now everything looks solid 👍

@Mati365 Mati365 merged commit bdf5af9 into master Mar 10, 2026
10 checks passed
@Mati365 Mati365 deleted the ck/19787 branch March 10, 2026 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collision between linear gradient backgrounds and TableProperties

3 participants