Skip to content

Commit e56c901

Browse files
author
Farzad Hayat
authored
DOC-2425: Update migration guide and 7.0 release notes regarding force_hex_colour (#3350)
1 parent 8871a38 commit e56c901

File tree

4 files changed

+21
-34
lines changed

4 files changed

+21
-34
lines changed

modules/ROOT/pages/7.0-release-notes.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,9 +543,9 @@ Previously, the bespoke `styles` select toolbar button in {productname} defaulte
543543
=== Removed `force_hex_color` option, with the default now being all colors are forced to HEX format and as lower case.
544544
// #TINY-10436
545545

546-
Previously in {productname} 6, all colors in the content HTML were set to use `rgb` values by default. As the common practice is using `hex` values this change has been **reverted**.
546+
Previously in {productname} 6, all colors in the content HTML were set to use `rgb` values by default. As the common practice is using `hex` values, this change has been **reverted**.
547547

548-
As a result, in {productname} 7, all colors are converted to use `hex` values and the `forced_hex_color` option is removed. The exception being `rgba` color values, they are left as is.
548+
As a result, in {productname} 7, only RGB values in absolute value like `rgb(255, 255, 255)` are converted to HEX values. Other RGB formats such as those with non-absolute values, and color options such as RGBA and HSL remain unchanged. The `forced_hex_color` option has been removed.
549549

550550
For more information, see xref:migration-from-6x.adoc#force-hex-color[Migrating from {productname} 6 to {productname} 7].
551551

modules/ROOT/pages/content-formatting.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,3 @@ include::partial$configuration/formats.adoc[]
77
include::partial$configuration/format_empty_lines.adoc[]
88

99
include::partial$configuration/format_noneditable_selector.adoc[]
10-
11-
include::partial$configuration/force_hex_color.adoc[]

modules/ROOT/pages/migration-from-6x.adoc

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,19 +125,33 @@ This change does not impact editors using inline mode.
125125
[[force-hex-color]]
126126
==== `force_hex_color`
127127

128-
Previously in {productname} 6, all colors in the content HTML were set to use `rgb` values by default. As the common practice is using `hex` values this change has been reverted.
128+
Previously in {productname} 6, all colors in the content HTML were set to use `rgb` values by default. As the common practice is using `hex` values, this change has been reverted.
129129

130130
.Example
131131
[source, html]
132132
----
133-
<!-- example using RGB values -->
133+
<!-- example before property value conversion -->
134+
// RGB value
134135
<p>Hello <span style="color: rgb(255, 0, 0);">red</span> color</p>
135-
136-
<!-- example using HEX values -->
136+
// RGBA value
137+
<p>Hello <span style="color: rgba(255, 0, 0, 0.5);">red</span> color</p>
138+
// HSL value
139+
<p>Hello <span style="color: hsl(0, 100%, 50%);">red</span> color</p>
140+
// RGB value with alpha parameter
141+
<p>Hello <span style="color: rgb(255, 0, 0 / 10%);">red</span> color</p>
142+
// RGB value with calculation
143+
<p>Hello <span style="color: rgb(from hsl(0 100% 50%) 132 132 224);">red</span> color</p>
144+
145+
<!-- example after property value conversion -->
137146
<p>Hello <span style="color: #ff0000">red</span> color</p>
147+
<p>Hello <span style="color: rgba(255, 0, 0, 0.5);">red</span> color</p>
148+
<p>Hello <span style="color: hsl(0, 100%, 50%);">red</span> color</p>
149+
// non-absolute values and absolute values with calculation will not be converted to HEX color
150+
<p>Hello <span style="color: rgb(255, 0, 0 / 10%);">red</span> color</p>
151+
<p>Hello <span style="color: rgb(from hsl(0 100% 50%) 132 132 224);">red</span> color</p>
138152
----
139153

140-
In {productname} 7.0, all colors (excluding `rgba` values) are converted to use `hex` values and the `forced_hex_color` option has been removed.
154+
In {productname} 7.0, only RGB values in absolute value like `rgb(255, 255, 255)` are converted to HEX values. Other RGB formats such as those with non-absolute values, and color options such as RGBA and HSL remain unchanged. The `forced_hex_color` option has been removed.
141155

142156
[[plugins]]
143157
== Plugins

modules/ROOT/partials/configuration/force_hex_color.adoc

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)