diff --git a/law-widget-styles/css/law-widget-styles.css b/law-widget-styles/css/law-widget-styles.css index ec25af5a..cec1aa3b 100644 --- a/law-widget-styles/css/law-widget-styles.css +++ b/law-widget-styles/css/law-widget-styles.css @@ -838,6 +838,13 @@ border: 1px solid #ddd; border-collapse: collapse; } +.akoma-ntoso table.akn--no-border { + border-width: 0px; +} +.akoma-ntoso table.akn--no-border th, +.akoma-ntoso table.akn--no-border td { + border-width: 0px; +} .akoma-ntoso table th, .akoma-ntoso table td { border-top: 1px solid #ddd; diff --git a/law-widget-styles/scss/mixins/_tables.scss b/law-widget-styles/scss/mixins/_tables.scss index 45f2a52b..08b3502f 100644 --- a/law-widget-styles/scss/mixins/_tables.scss +++ b/law-widget-styles/scss/mixins/_tables.scss @@ -11,6 +11,16 @@ border: $akn-table-border-width solid $akn-table-border-colour; border-collapse: collapse; + // hide borders for .akn--no-border + &.akn--no-border { + border-width: 0px; + + th, + td { + border-width: 0px; + } + } + // Cells th, td { diff --git a/law-widget-styles/tests/__image_snapshots__/visual-test-js-tables-1-snap.png b/law-widget-styles/tests/__image_snapshots__/visual-test-js-tables-1-snap.png index f2e5c6f5..ddbc3ae7 100644 Binary files a/law-widget-styles/tests/__image_snapshots__/visual-test-js-tables-1-snap.png and b/law-widget-styles/tests/__image_snapshots__/visual-test-js-tables-1-snap.png differ diff --git a/law-widget-styles/tests/tables.html b/law-widget-styles/tests/tables.html index 3dc6df3c..b1da4d99 100644 --- a/law-widget-styles/tests/tables.html +++ b/law-widget-styles/tests/tables.html @@ -8,15 +8,55 @@
-
- - - - - - - - -
heading 1heading 2
cell 1cell 2
+ + + + +

1 Plain

+ +
+ + + + + + + + +
+ heading 1 + + heading 2 +
+ cell 1 + + cell 2 +
+
+

2 No heading

+ +
+ + + + + + + + +
+ heading 1 + + heading 2 +
+ cell 1 + + cell 2 +
+
+
+
+
+ diff --git a/law-widget-styles/tests/tables.txt b/law-widget-styles/tests/tables.txt index 5085e70d..f82988af 100644 --- a/law-widget-styles/tests/tables.txt +++ b/law-widget-styles/tests/tables.txt @@ -1,9 +1,31 @@ BODY -{| -! heading 1 -! heading 2 -|- -| cell 1 -| cell 2 -|} + SEC 1 - Plain + + TABLE + TR + TH + heading 1 + TH + heading 2 + + TR + TC + cell 1 + TC + cell 2 + + SEC 2 - No heading + + TABLE.akn--no-border + TR + TH + heading 1 + TH + heading 2 + + TR + TC + cell 1 + TC + cell 2 diff --git a/law-widget-styles/tests/traditions/__image_snapshots__/ke-test-js-judgment-inlines-1-snap.png b/law-widget-styles/tests/traditions/__image_snapshots__/ke-test-js-judgment-inlines-1-snap.png index d551b686..ef634bf7 100644 Binary files a/law-widget-styles/tests/traditions/__image_snapshots__/ke-test-js-judgment-inlines-1-snap.png and b/law-widget-styles/tests/traditions/__image_snapshots__/ke-test-js-judgment-inlines-1-snap.png differ diff --git a/law-widget-styles/tests/traditions/__image_snapshots__/ke-test-js-judgment-judgment-header-1-snap.png b/law-widget-styles/tests/traditions/__image_snapshots__/ke-test-js-judgment-judgment-header-1-snap.png index c30ee4c0..610b3674 100644 Binary files a/law-widget-styles/tests/traditions/__image_snapshots__/ke-test-js-judgment-judgment-header-1-snap.png and b/law-widget-styles/tests/traditions/__image_snapshots__/ke-test-js-judgment-judgment-header-1-snap.png differ diff --git a/law-widget-styles/tests/traditions/__image_snapshots__/ke-test-js-judgment-judgment-tables-1-snap.png b/law-widget-styles/tests/traditions/__image_snapshots__/ke-test-js-judgment-judgment-tables-1-snap.png index f2e5c6f5..91f8dc9b 100644 Binary files a/law-widget-styles/tests/traditions/__image_snapshots__/ke-test-js-judgment-judgment-tables-1-snap.png and b/law-widget-styles/tests/traditions/__image_snapshots__/ke-test-js-judgment-judgment-tables-1-snap.png differ diff --git a/law-widget-styles/tests/visual.test.js b/law-widget-styles/tests/visual.test.js index b4af67b8..2ff81ea2 100644 --- a/law-widget-styles/tests/visual.test.js +++ b/law-widget-styles/tests/visual.test.js @@ -3,7 +3,7 @@ expect.extend({ toMatchImageSnapshot }); const config = { comparisonMethod: 'pixelmatch', - failureThreshold: 1.0, + failureThreshold: 0.0, failureThresholdType: 'percent', };