You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
border-* requires all values (width, style, color) to proper display the element. If any is missing, the "initial" data will be applied which is wrong because it overrides the default styles (from the website).
If all border definitions are the same, why couldn't we merge them into single property?
It is also possible to load different values than the editor accepts. E.g. when loading the table will the following styles:
/* Assuming that border-color defines the website. */border-top-style: solid;
border-top-width:2px;
border-right-style: solid;
border-right-width:4px;
border-bottom-style: solid;
border-right-width:6px;
border-left-style: solid;
border-left-width:8px;
The editor should return:
/* border-style is merged into the single property. */border-style: solid;
border-top-width:2px;
border-right-width:4px;
border-right-width:6px;
border-left-width:8px;
The text was updated successfully, but these errors were encountered:
Other (table): Border definitions produced by the `TableProperties` and `TableCellProperties` features will be merged into a group if possible. Instead of producing `border-(top|right|bottom|left):*` property, the `border:*` definition will be returned. The same applies to the table cell padding. See #9490.
Feature (engine): The `StylesProcessor` reducer for `border:*` CSS property was extended to be able to merge to `border:*` property if all its properties (width, style, and color) are specified. Otherwise, `border-(width|style|color)` definition should be returned. Closes#9490.
MINOR BREAKING CHANGE (table): Values for the `borderColor`, `borderStyle`, `borderWidth`, and `padding` model attributes are unified (to values produced by the editor itself) while upcasting the table or table cells if all sides (top, right, bottom, and left) have the same values. Previously, the `<table style="border: 1px solid #ff0">` element was upcasted to `<table borderStyle="{"top":"solid","right":"solid","bottom":"solid","left":"solid"}" borderColor="{...}" borderWidth="{...}">`. Now the object will be replaced with the string value: `<table borderStyle="solid" borderColor="#ff0" borderWidth="1px">`. The same structure is created when using the editor's toolbar. If border values are not identical, the object notation will be inserted into the model (as it is now).
MINOR BREAKING CHANGE (table): Conversion helpers: `upcastStyleToAttribute()`, `downcastAttributeToStyle()`, `downcastTableAttribute()` accept two arguments now (the conversion instance and the options object). The previous usage: `conversionHelper( conversion, /* ... */ )` should be replaced with `conversionHelper( conversion, { /* ... */ } )`.
📝 Provide a description of the improvement
Consider the following examples.
<table borderStyle="solid">
<table style="border-bottom:solid;border-left:solid;border-right:solid;border-top:solid;">
<table style="border-style:solid;">
border-*
requires all values (width, style, color) to proper display the element. If any is missing, the "initial" data will be applied which is wrong because it overrides the default styles (from the website).<table borderStyle="solid" borderWidth="2px">
<table style="border-bottom:2px solid;border-left:2px solid;border-right:2px solid;border-top:2px solid;">
<table style="border-style:solid;border-width:2px;">
<table borderColor="#f00" borderStyle="solid" borderWidth="2px">
<table style="border-bottom:2px solid #f00;border-left:2px solid #f00;border-right:2px solid #f00;border-top:2px solid #f00;">
<table style="border:2px solid #f00;">
It is also possible to load different values than the editor accepts. E.g. when loading the table will the following styles:
The editor should return:
The text was updated successfully, but these errors were encountered: