From e2c078d0ebbf66c2dce69a96a3d350e804d2eacc Mon Sep 17 00:00:00 2001 From: MSzturc Date: Wed, 31 Aug 2022 10:03:43 +0200 Subject: [PATCH] removed reset margin from grid by default --- src/transformers/gridTransformer.ts | 4 - .../basicSyntax.unit.test.ts.snap | 4 +- .../extendedSyntax.unit.test.ts.snap | 40 +++---- .../gridComponent.unit.test.ts.snap | 100 +++++++++--------- test/__snapshots__/template.unit.test.ts.snap | 6 +- 5 files changed, 75 insertions(+), 79 deletions(-) diff --git a/src/transformers/gridTransformer.ts b/src/transformers/gridTransformer.ts index fdd01b3f..4a77657a 100644 --- a/src/transformers/gridTransformer.ts +++ b/src/transformers/gridTransformer.ts @@ -40,10 +40,6 @@ export class GridTransformer implements AttributeTransformer { const height = this.heightOf(grid) + defaultUnit; const width = this.widthOf(grid) + defaultUnit; - if (!isAbsolute) { - element.addClass('reset-margin'); - } - element.addStyle('position', 'absolute'); element.addStyle('left', left); element.addStyle('top', top); diff --git a/test/__snapshots__/basicSyntax.unit.test.ts.snap b/test/__snapshots__/basicSyntax.unit.test.ts.snap index 06c2b3f1..e769364b 100644 --- a/test/__snapshots__/basicSyntax.unit.test.ts.snap +++ b/test/__snapshots__/basicSyntax.unit.test.ts.snap @@ -79,7 +79,7 @@ Callouts support manipulation through annotations -
+
@@ -102,7 +102,7 @@ Here is an Example for an Callout in a Slide. Callouts support dark and white ba
-
+
diff --git a/test/__snapshots__/extendedSyntax.unit.test.ts.snap b/test/__snapshots__/extendedSyntax.unit.test.ts.snap index a29098fe..815b499e 100644 --- a/test/__snapshots__/extendedSyntax.unit.test.ts.snap +++ b/test/__snapshots__/extendedSyntax.unit.test.ts.snap @@ -9,45 +9,45 @@ exports[`Advanced Slides Feature > Show Debug Grid 1`] = ` This slide shows the debug view feature -
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
" `; diff --git a/test/__snapshots__/gridComponent.unit.test.ts.snap b/test/__snapshots__/gridComponent.unit.test.ts.snap index 2d263f32..a87fe76a 100644 --- a/test/__snapshots__/gridComponent.unit.test.ts.snap +++ b/test/__snapshots__/gridComponent.unit.test.ts.snap @@ -4,7 +4,7 @@ exports[`Grid Component > Attributes > Alignment > Stretch > Col 1`] = ` "
-
+
![](https://picsum.photos/id/978/150/150) ![](https://picsum.photos/id/978/150/150) @@ -16,7 +16,7 @@ exports[`Grid Component > Attributes > Alignment > Stretch > Row 1`] = ` "
-
+
![](https://picsum.photos/id/978/150/150) ![](https://picsum.photos/id/978/150/150) @@ -29,7 +29,7 @@ exports[`Grid Component > Attributes > Alignment 1`] = ` "
-
+
\\"\\" \\"\\" @@ -42,7 +42,7 @@ exports[`Grid Component > Attributes > Alignment 2`] = ` "
-
+
\\"\\" \\"\\" @@ -55,7 +55,7 @@ exports[`Grid Component > Attributes > Alignment 3`] = ` "
-
+
\\"\\" \\"\\" @@ -68,7 +68,7 @@ exports[`Grid Component > Attributes > Alignment 4`] = ` "
-
+
\\"\\" \\"\\" @@ -81,7 +81,7 @@ exports[`Grid Component > Attributes > Alignment 5`] = ` "
-
+
\\"\\" \\"\\" @@ -94,7 +94,7 @@ exports[`Grid Component > Attributes > Alignment 6`] = ` "
-
+
\\"\\" \\"\\" @@ -107,7 +107,7 @@ exports[`Grid Component > Attributes > Alignment 7`] = ` "
-
+
\\"\\" \\"\\" @@ -120,7 +120,7 @@ exports[`Grid Component > Attributes > Alignment 8`] = ` "
-
+
\\"\\" \\"\\" @@ -133,7 +133,7 @@ exports[`Grid Component > Attributes > Alignment 9`] = ` "
-
+
\\"\\" \\"\\" @@ -146,7 +146,7 @@ exports[`Grid Component > Attributes > Alignment 10`] = ` "
-
+
\\"\\" \\"\\" @@ -159,7 +159,7 @@ exports[`Grid Component > Attributes > Alignment 11`] = ` "
-
+
\\"\\" \\"\\" @@ -172,7 +172,7 @@ exports[`Grid Component > Attributes > Alignment 12`] = ` "
-
+
\\"\\" \\"\\" @@ -185,7 +185,7 @@ exports[`Grid Component > Attributes > Alignment 13`] = ` "
-
+
\\"\\" \\"\\" @@ -198,7 +198,7 @@ exports[`Grid Component > Attributes > Alignment 14`] = ` "
-
+
\\"\\" \\"\\" @@ -211,7 +211,7 @@ exports[`Grid Component > Attributes > Alignment 15`] = ` "
-
+
\\"\\" \\"\\" @@ -224,7 +224,7 @@ exports[`Grid Component > Attributes > Alignment 16`] = ` "
-
+
\\"\\" \\"\\" @@ -237,7 +237,7 @@ exports[`Grid Component > Attributes > Alignment 17`] = ` "
-
+
\\"\\" \\"\\" @@ -250,7 +250,7 @@ exports[`Grid Component > Attributes > Alignment 18`] = ` "
-
+
\\"\\" \\"\\" @@ -263,17 +263,17 @@ exports[`Grid Component > Attributes > Background 1`] = ` "
-
+
### Make
-
+
### Noise
-
+
### some
@@ -284,17 +284,17 @@ exports[`Grid Component > Attributes > Border 1`] = ` "
-
+
thick dotted blue
-
+
20px solid white
-
+
thick dotted blue
@@ -305,12 +305,12 @@ exports[`Grid Component > Attributes > Filter 1`] = ` "
-
+
Text is too blurry
-
+
\\"\\"
@@ -321,12 +321,12 @@ exports[`Grid Component > Attributes > Padding 1`] = ` "
-
+
###### Lorem Ipsum wasnt simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book here there
-
+
\\"\\"
@@ -337,19 +337,19 @@ exports[`Grid Component > Attributes > Padding 2`] = ` "
-
+
### Fragments: - ­Right - ­Bottom
-
+
Right Grid
-
+
Bottom Grid
@@ -360,12 +360,12 @@ exports[`Grid Component > Attributes > Rotate 1`] = ` "
-
+
Hello
-
+
World!
@@ -376,17 +376,17 @@ exports[`Grid Component > Basic Syntax 1`] = ` "
-
+
### Left
-
+
### Right
-
+
### Bottom
@@ -397,17 +397,17 @@ exports[`Grid Component > Basic Syntax 2`] = ` "
-
+
### Left
-
+
### Right
-
+
### Bottom
@@ -418,7 +418,7 @@ exports[`Grid Component > Column Flow 1`] = ` "
-
+
### Lorem \\"\\" @@ -431,22 +431,22 @@ exports[`Grid Component > Position Coordinates 1`] = ` "
-
+
### Positive X, Y
-
+
### Negative X, Positive Y
-
+
### Negative X, Y
-
+
### Positive X, Negative Y
@@ -457,17 +457,17 @@ exports[`Grid Component > Position by Name 1`] = ` "
-
+
### Top Left
-
+
### Right Default Size
-
+
### Bottom
@@ -478,7 +478,7 @@ exports[`Grid Component > Row Flow 1`] = ` "
-
+
### Lorem \\"\\" diff --git a/test/__snapshots__/template.unit.test.ts.snap b/test/__snapshots__/template.unit.test.ts.snap index 4e6a10a2..035067db 100644 --- a/test/__snapshots__/template.unit.test.ts.snap +++ b/test/__snapshots__/template.unit.test.ts.snap @@ -19,7 +19,7 @@ exports[`Template with invisible variable not set 1`] = ` # MyContent - # After
+ # After
@@ -32,7 +32,7 @@ exports[`Template with variable not set 1`] = ` # MyContent - # After
+ # After
<% footer %>
@@ -48,7 +48,7 @@ exports[`Template with variable set 1`] = ` - # After
+ # After