Skip to content

Commit 2095664

Browse files
author
Dennis Heibült
committed
[refs #298] Change crop-classes approach to bg-position
1 parent 062215f commit 2095664

File tree

2 files changed

+27
-16
lines changed

2 files changed

+27
-16
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
### Breaking changes
88
- Remove all `.o-wrapper` modifier and return to the initial, bare wrapper object. [[#299](https://github.com/inuitcss/inuitcss/issues/299)]
9-
- The `.o-crop__content--center` modifier of the crop object is renamed to `.o-crop__content--centered`. [[#298](https://github.com/inuitcss/inuitcss/issues/298)]
109

1110
### New features
1211
- Add `.o-crop--fill` modifier. [[#278](https://github.com/inuitcss/inuitcss/issues/278)]

objects/_objects.crop.scss

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,44 +57,56 @@ $inuit-crops: (
5757
*
5858
*/
5959

60-
.o-crop__content--top {
61-
top: 0;
62-
bottom: auto;
60+
.o-crop__content--left-top {
61+
left: 0;
6362
}
6463

65-
.o-crop__content--right {
66-
right: 0;
67-
left: auto;
64+
.o-crop__content--left-center {
65+
top: 50%;
66+
transform: translateY(-50%);
6867
}
6968

70-
.o-crop__content--bottom {
69+
.o-crop__content--left-bottom {
7170
top: auto;
7271
bottom: 0;
7372
}
7473

75-
.o-crop__content--left {
76-
left: 0;
77-
right: auto;
74+
.o-crop__content--right-top {
75+
right: 0;
76+
left: auto;
7877
}
7978

80-
.o-crop__content--middle {
79+
.o-crop__content--right-center {
8180
top: 50%;
82-
bottom: auto;
8381
transform: translateY(-50%);
8482
}
8583

86-
.o-crop__content--center {
87-
right: auto;
84+
.o-crop__content--right-bottom {
85+
top: auto;
86+
right: 0;
87+
bottom: 0;
88+
left: auto;
89+
}
90+
91+
.o-crop__content--center-top {
8892
left: 50%;
8993
transform: translateX(-50%);
9094
}
9195

92-
.o-crop__content--centered {
96+
.o-crop__content--center,
97+
.o-crop__content--center-center {
9398
top: 50%;
9499
left: 50%;
95100
transform: translate(-50%, -50%);
96101
}
97102

103+
.o-crop__content--center-bottom {
104+
top: auto;
105+
bottom: 0;
106+
left: 50%;
107+
transform: translateX(-50%);
108+
}
109+
98110

99111

100112

0 commit comments

Comments
 (0)