PhpSpreadsheet/tests/PhpSpreadsheetTests/Style
oleibman 7e3807309d
Reconcile Differences between Css and Excel For Cell Alignment (#3048)
This PR expands on PR #2195 from @nkjackzhang. That PR has been stalled for some time awaiting requested fixes. Those fixes are part of this PR, and additional tests and samples are added. The original request was to handle `vertical-align:middle` in Css (Excel uses `center`). This PR does its best to also handle vertical alignment Excel values not found in Css - `justify` (as `middle`) and `distributed` (as `middle`). It likewises handles valid Css values not found in Excel (`baseline`, `sub`, and `text-bottom` as `bottom`; `super` and `text-top` as `top`; `middle` as `center`).

It also handles horizontal alignment Excel values not found in Css - `center-continuous` as `center` and `distributed` as `justify`; I couldn't think of a reasonable equivalent for `fill`, so it is ignored.

The values assigned for vertical and horizontal alignment are now lower-cased (special handling required for `centerContinuous`).
2022-09-09 07:34:36 -07:00
..
ConditionalFormatting Correct Namespaces in 11 Tests (#3020) 2022-08-20 19:58:43 -07:00
AlignmentMiddleTest.php Reconcile Differences between Css and Excel For Cell Alignment (#3048) 2022-09-09 07:34:36 -07:00
AlignmentTest.php Reconcile Differences between Css and Excel For Cell Alignment (#3048) 2022-09-09 07:34:36 -07:00
BorderRangeTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
BorderTest.php Add exportArray Method for Styles (#1580) 2020-10-26 20:56:24 +01:00
ColorIndexTest.php Reading Xlsx With Supplied Palette (#2595) 2022-02-23 22:09:22 -08:00
ColorTest.php Eliminate Most Scrutinizer Problems in Test Suite (#2699) 2022-03-21 13:58:42 -07:00
ConditionalBoolTest.php Handle Booleans in Conditional Styles (#2654) 2022-03-09 18:30:57 -08:00
ConditionalTest.php Add exportArray Method for Styles (#1580) 2020-10-26 20:56:24 +01:00
ExportArrayTest.php Fill Pattern Start and End Colors (#2444) 2021-12-18 08:53:23 -08:00
FillTest.php Add exportArray Method for Styles (#1580) 2020-10-26 20:56:24 +01:00
FontTest.php Fix Spreadsheet Copy, Disable Clone, Improve Coverage (#2951) 2022-07-28 07:03:26 -07:00
NumberFormatBuiltinTest.php Add exportArray Method for Styles (#1580) 2020-10-26 20:56:24 +01:00
NumberFormatRoundTest.php Rounding in NumberFormatter (#2399) 2021-11-26 09:05:35 -08:00
NumberFormatTest.php Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
StyleTest.php Optimize applyFromArray by caching existing styles (#1785) 2021-10-31 00:55:00 +09:00