Skip to content

Commit e8abda7

Browse files
authored
Add auto margin left and right classes (#1048)
* Add auto margin class * remove mx-auto * move to the layout.css
1 parent 33e7199 commit e8abda7

4 files changed

Lines changed: 13 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.9.2
4+
5+
- [add] Add `ml-auto` and `mr-auto`
6+
37
## 1.9.1
48

59
- [add] Modify `snow` icon

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mapbox/assembly",
3-
"version": "1.9.1",
3+
"version": "1.9.2",
44
"description": "A CSS framework",
55
"main": "index.js",
66
"files": [

src/layout.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,18 @@
163163
*/
164164

165165
/**
166-
* Set `auto` margins on left and right. This pattern is useful for horizontally centering block elements.
166+
* Set `auto` margins on left and right. This pattern is useful for horizontally centering block elements
167+
* or aligning block elements to the start or end of their container.
167168
*
168169
* @example
169170
* <div class='mx-auto w60 bg-darken10'>mx-auto</div>
171+
* <div class='ml-auto w60 bg-darken10'>ml-auto</div>
172+
* <div class='mr-auto w60 bg-darken10'>mr-auto</div>
170173
* @memberof Margins
171174
*/
172175
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
176+
.ml-auto { margin-left: auto !important; }
177+
.mr-auto { margin-right: auto !important; }
173178

174179
/**
175180
* All padding classes fit the following pattern: `m<side><size>`.

0 commit comments

Comments
 (0)