@pageboard/html 0.11.3 → 0.11.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,14 +25,16 @@ exports.fieldset = {
25
25
  }
26
26
  },
27
27
  plain: {
28
- title: 'Without borders',
28
+ title: 'Plain',
29
+ description: 'Without legend or borders',
29
30
  type: 'boolean',
30
31
  default: false
31
32
  }
32
33
  },
33
34
  contents: "fieldset_legend block+",
34
35
  html: '<fieldset class="[plain|?]" data-name="[name]" data-value="[value]" is="element-fieldset"></fieldset>',
35
- scripts: ["../ui/fieldset.js"]
36
+ scripts: ["../ui/fieldset.js"],
37
+ stylesheets: ['../ui/fieldset.css']
36
38
  };
37
39
 
38
40
  exports.fieldset_legend = {
@@ -94,6 +94,33 @@ exports.layout = {
94
94
  const: '%'
95
95
  }]
96
96
  },
97
+ margins: {
98
+ title: 'Margins',
99
+ type: 'object',
100
+ nullable: true,
101
+ properties: {
102
+ inline: {
103
+ title: 'Inline (em)',
104
+ type: 'number',
105
+ default: 0,
106
+ multipleOf: 0.1,
107
+ nullable: true
108
+ },
109
+ inlineUnits: {
110
+ const: 'em'
111
+ },
112
+ block: {
113
+ title: 'Block (rem)',
114
+ type: 'number',
115
+ default: 0,
116
+ multipleOf: 0.1,
117
+ nullable: true
118
+ },
119
+ blockUnits: {
120
+ const: 'rem'
121
+ }
122
+ }
123
+ },
97
124
  invert: {
98
125
  title: 'Invert',
99
126
  description: 'Invert background',
@@ -127,6 +154,7 @@ exports.layout = {
127
154
  crop: {
128
155
  title: 'Crop and scale',
129
156
  type: "object",
157
+ nullable: true,
130
158
  properties: {
131
159
  x: {
132
160
  type: "number",
@@ -260,6 +288,8 @@ exports.layout = {
260
288
  [direction]
261
289
  [invert|?:inverted]"
262
290
  is="element-layout"
291
+ style-margin-block="[margins.block|eq:0:|not|magnet][margins.blockUnits]"
292
+ style-margin-inline="[margins.inline|eq:0:|not|magnet][margins.inlineUnits]"
263
293
  style-height="[height|eq:0:|not|magnet][heightUnits]"
264
294
  data-src="[background.image]"
265
295
  data-crop="[background.crop.x];[background.crop.y];[background.crop.width];[background.crop.height];[background.crop.zoom]"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pageboard/html",
3
- "version": "0.11.3",
3
+ "version": "0.11.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,6 +1,3 @@
1
- fieldset {
2
- padding: 1rem;
3
- }
4
1
  element-fieldset-list {
5
2
  display: block;
6
3
  position: relative;
@@ -0,0 +1,14 @@
1
+ fieldset:not(.plain) {
2
+ padding: 1em;
3
+ padding-top:0.5em;
4
+ }
5
+ fieldset.plain {
6
+ padding:0;
7
+ }
8
+ fieldset.plain > legend {
9
+ display:none;
10
+ }
11
+ fieldset:not(.plain) > legend {
12
+ padding-left:0.1em;
13
+ padding-right:0.2em;
14
+ }