Skip to content

Commit e00fe43

Browse files
committed
Style changes
1 parent d8795e1 commit e00fe43

File tree

2 files changed

+16
-151
lines changed

2 files changed

+16
-151
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chmod-checkbox",
3-
"version": "0.0.1",
3+
"version": "0.0.11",
44
"description": "Simple and ready to use chmod based checkbox web component with StencilJS",
55
"main": "dist/index.js",
66
"module": "dist/index.mjs",

src/components/chmod-checkbox/chmod-checkbox.scss

Lines changed: 15 additions & 150 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ $base-color: #66ab1b;
22
$second-color: #fff;
33

44
.animated-checkbox {
5-
display: table-cell; // to center the item
65
width: 100%;
76
height: 100%;
8-
vertical-align: middle; // to center the item
97
text-align: center; // to center the item
8+
display: table-cell; // to center the item
9+
vertical-align: middle; // to center the item
1010
}
1111

1212
.flex-center-vertically {
@@ -23,29 +23,28 @@ $second-color: #fff;
2323
}
2424

2525
label {
26-
display: inline-block; // to make it easier to click
27-
color: $base-color;
2826
cursor: pointer;
27+
color: $base-color;
2928
position: relative; // important
29+
display: inline-block; // to make it easier to click
3030

3131
// Now we'll create the checkbox object
3232
span {
33-
display: inline-block;
34-
position: relative;
35-
background-color: transparent;
3633
width: 25px;
3734
height: 25px;
38-
transform-origin: center;
39-
border: 2px solid $base-color;
4035
border-radius: 50%;
41-
vertical-align: -6px;
4236
margin-right: 10px;
37+
position: relative;
4338
box-sizing: initial;
39+
vertical-align: -6px;
40+
display: inline-block;
41+
transform-origin: center;
42+
background-color: transparent;
43+
border: 2px solid $base-color;
4444
transition: background-color 150ms 200ms,
4545
transform 350ms cubic-bezier(0.78, -1.22, 0.17, 1.89); // custom ease effect for bouncy animation
4646

4747
// Now we'll create the "tick" using pseudo elements - those will be basically two lines that will be rotated to form the "tick"
48-
4948
&:before {
5049
content: "";
5150
width: 0px;
@@ -65,13 +64,13 @@ label {
6564
width: 0;
6665
height: 2px;
6766
border-radius: 2px; // so that the tick has nice rounded look
68-
background: $base-color;
6967
position: absolute;
68+
transform-origin: 0% 0%;
69+
background: $base-color;
7070
transform: rotate(305deg);
71-
top: 16px; // you'll need to experiment with placement depending on the dimensions you've chosen
72-
left: 10px; // you'll need to experiment with placement depending on the dimensions you've chosen
7371
transition: width 50ms ease;
74-
transform-origin: 0% 0%;
72+
left: 10px; // you'll need to experiment with placement depending on the dimensions you've chosen
73+
top: 16px; // you'll need to experiment with placement depending on the dimensions you've chosen
7574
}
7675
}
7776
// Time to add some life to it
@@ -139,9 +138,8 @@ input[type="checkbox"] {
139138

140139
.wrapper {
141140
display: grid;
142-
grid-template-columns: repeat(3, 1fr);
143141
grid-gap: 10px;
144-
grid-auto-rows: minmax(100px, auto);
142+
grid-template-columns: repeat(3, 1fr);
145143
}
146144

147145
.column1 {
@@ -156,136 +154,3 @@ input[type="checkbox"] {
156154
grid-column: 3;
157155
grid-row: 3;
158156
}
159-
160-
/**
161-
* Bootstrap CSS
162-
*/
163-
164-
// .col-xl-1,
165-
// .col-xxl-1,
166-
// .col-xxxl-1,
167-
// .col-xl-2,
168-
// .col-xxl-2,
169-
// .col-md-2,
170-
// .col-xxxl-2,
171-
// .col-xl-3,
172-
// .col-xxl-3,
173-
// .col-md-3,
174-
// .col-xxxl-3,
175-
// .col-xl-4,
176-
// .col-xxl-4,
177-
// .col-md-4,
178-
// .col-xxxl-4,
179-
// .col-xl-5,
180-
// .col-xxl-5,
181-
// .col-md-5,
182-
// .col-xxxl-5,
183-
// .col-xl-6,
184-
// .col-xxl-6,
185-
// .col-md-6,
186-
// .col-xxxl-6,
187-
// .col-xl-7,
188-
// .col-xxl-7,
189-
// .col-md-7,
190-
// .col-xxxl-7,
191-
// .col-xl-8,
192-
// .col-xxl-8,
193-
// .col-md-8,
194-
// .col-xxxl-8,
195-
// .col-xl-9,
196-
// .col-xxl-9,
197-
// .col-md-9,
198-
// .col-xxxl-9,
199-
// .col-xl-10,
200-
// .col-xxl-100,
201-
// .col-xxxl-10,
202-
// .col-xl-11,
203-
// .col-xxl-111,
204-
// .col-xxxl-11,
205-
// .col-xl-12,
206-
// .col-xxl-122,
207-
// .col-xxxl-12 {
208-
// position: relative;
209-
// min-height: 1px;
210-
// padding-right: 15px;
211-
// padding-left: 15px;
212-
// }
213-
// @media (min-width: 992px) {
214-
// .col-md-4 {
215-
// width: 33.33333333%;
216-
// }
217-
// }
218-
// @media (min-width: 992px) {
219-
// .col-md-1,
220-
// .col-md-10,
221-
// .col-md-11,
222-
// .col-md-12,
223-
// .col-md-2,
224-
// .col-md-3,
225-
// .col-md-4,
226-
// .col-md-5,
227-
// .col-md-6,
228-
// .col-md-7,
229-
// .col-md-8,
230-
// .col-md-9 {
231-
// float: left;
232-
// }
233-
// }
234-
// .col-lg-1,
235-
// .col-lg-10,
236-
// .col-lg-11,
237-
// .col-lg-12,
238-
// .col-lg-2,
239-
// .col-lg-3,
240-
// .col-lg-4,
241-
// .col-lg-5,
242-
// .col-lg-6,
243-
// .col-lg-7,
244-
// .col-lg-8,
245-
// .col-lg-9,
246-
// .col-md-1,
247-
// .col-md-10,
248-
// .col-md-11,
249-
// .col-md-12,
250-
// .col-md-2,
251-
// .col-md-3,
252-
// .col-md-4,
253-
// .col-md-5,
254-
// .col-md-6,
255-
// .col-md-7,
256-
// .col-md-8,
257-
// .col-md-9,
258-
// .col-sm-1,
259-
// .col-sm-10,
260-
// .col-sm-11,
261-
// .col-sm-12,
262-
// .col-sm-2,
263-
// .col-sm-3,
264-
// .col-sm-4,
265-
// .col-sm-5,
266-
// .col-sm-6,
267-
// .col-sm-7,
268-
// .col-sm-8,
269-
// .col-sm-9,
270-
// .col-xs-1,
271-
// .col-xs-10,
272-
// .col-xs-11,
273-
// .col-xs-12,
274-
// .col-xs-2,
275-
// .col-xs-3,
276-
// .col-xs-4,
277-
// .col-xs-5,
278-
// .col-xs-6,
279-
// .col-xs-7,
280-
// .col-xs-8,
281-
// .col-xs-9 {
282-
// position: relative;
283-
// min-height: 1px;
284-
// padding-right: 15px;
285-
// padding-left: 15px;
286-
// }
287-
288-
// .row {
289-
// margin-right: -15px;
290-
// margin-left: -15px;
291-
// }

0 commit comments

Comments
 (0)