Skip to content

Commit

Permalink
chore: add prettierrc
Browse files Browse the repository at this point in the history
Add prettierrc styling file to resolve automatic styling issues in the future.

I re-minified the dist folder using my minification tools. Feel free to reminify yourself prior to merging or provide docs on what you used to minify.

I also minified your .css file in your dist as well for consistency.
  • Loading branch information
dintriglia committed Mar 15, 2024
1 parent d37cb08 commit 45f3d4f
Show file tree
Hide file tree
Showing 5 changed files with 175 additions and 135 deletions.
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"printWidth": 400,
"tabWidth": 4,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"bracketSpacing": false,
"arrowParens": "avoid"
}
72 changes: 1 addition & 71 deletions dist/flexmasonry.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/flexmasonry.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

202 changes: 151 additions & 51 deletions src/flexmasonry.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,67 +4,167 @@
align-content: space-between;
}

.flexmasonry-item { width: 100%; }
.flexmasonry-cols-2 .flexmasonry-item { width: 50%; }
.flexmasonry-cols-3 .flexmasonry-item { width: 33.333%; }
.flexmasonry-cols-4 .flexmasonry-item { width: 25%; }
.flexmasonry-cols-5 .flexmasonry-item { width: 20%; }
.flexmasonry-cols-6 .flexmasonry-item { width: 16.666%; }
.flexmasonry-cols-7 .flexmasonry-item { width: 14.285%; }
.flexmasonry-cols-8 .flexmasonry-item { width: 12.5%; }
.flexmasonry-item {
width: 100%;
}
.flexmasonry-cols-2 .flexmasonry-item {
width: 50%;
}
.flexmasonry-cols-3 .flexmasonry-item {
width: 33.333%;
}
.flexmasonry-cols-4 .flexmasonry-item {
width: 25%;
}
.flexmasonry-cols-5 .flexmasonry-item {
width: 20%;
}
.flexmasonry-cols-6 .flexmasonry-item {
width: 16.666%;
}
.flexmasonry-cols-7 .flexmasonry-item {
width: 14.285%;
}
.flexmasonry-cols-8 .flexmasonry-item {
width: 12.5%;
}

.flexmasonry-cols-2 .flexmasonry-item:nth-child(2n+1) { order: 1; }
.flexmasonry-cols-2 .flexmasonry-item:nth-child(2n) { order: 2; }
.flexmasonry-cols-2 .flexmasonry-item:nth-child(2n + 1) {
order: 1;
}
.flexmasonry-cols-2 .flexmasonry-item:nth-child(2n) {
order: 2;
}

.flexmasonry-cols-3 .flexmasonry-item:nth-child(3n+1) { order: 1; }
.flexmasonry-cols-3 .flexmasonry-item:nth-child(3n+2) { order: 2; }
.flexmasonry-cols-3 .flexmasonry-item:nth-child(3n) { order: 3; }
.flexmasonry-cols-3 .flexmasonry-item:nth-child(3n + 1) {
order: 1;
}
.flexmasonry-cols-3 .flexmasonry-item:nth-child(3n + 2) {
order: 2;
}
.flexmasonry-cols-3 .flexmasonry-item:nth-child(3n) {
order: 3;
}

.flexmasonry-cols-4 .flexmasonry-item:nth-child(4n+1) { order: 1; }
.flexmasonry-cols-4 .flexmasonry-item:nth-child(4n+2) { order: 2; }
.flexmasonry-cols-4 .flexmasonry-item:nth-child(4n+3) { order: 3; }
.flexmasonry-cols-4 .flexmasonry-item:nth-child(4n) { order: 4; }
.flexmasonry-cols-4 .flexmasonry-item:nth-child(4n + 1) {
order: 1;
}
.flexmasonry-cols-4 .flexmasonry-item:nth-child(4n + 2) {
order: 2;
}
.flexmasonry-cols-4 .flexmasonry-item:nth-child(4n + 3) {
order: 3;
}
.flexmasonry-cols-4 .flexmasonry-item:nth-child(4n) {
order: 4;
}

.flexmasonry-cols-5 .flexmasonry-item:nth-child(5n+1) { order: 1; }
.flexmasonry-cols-5 .flexmasonry-item:nth-child(5n+2) { order: 2; }
.flexmasonry-cols-5 .flexmasonry-item:nth-child(5n+3) { order: 3; }
.flexmasonry-cols-5 .flexmasonry-item:nth-child(5n+4) { order: 4; }
.flexmasonry-cols-5 .flexmasonry-item:nth-child(5n) { order: 5; }
.flexmasonry-cols-5 .flexmasonry-item:nth-child(5n + 1) {
order: 1;
}
.flexmasonry-cols-5 .flexmasonry-item:nth-child(5n + 2) {
order: 2;
}
.flexmasonry-cols-5 .flexmasonry-item:nth-child(5n + 3) {
order: 3;
}
.flexmasonry-cols-5 .flexmasonry-item:nth-child(5n + 4) {
order: 4;
}
.flexmasonry-cols-5 .flexmasonry-item:nth-child(5n) {
order: 5;
}

.flexmasonry-cols-6 .flexmasonry-item:nth-child(6n+1) { order: 1; }
.flexmasonry-cols-6 .flexmasonry-item:nth-child(6n+2) { order: 2; }
.flexmasonry-cols-6 .flexmasonry-item:nth-child(6n+3) { order: 3; }
.flexmasonry-cols-6 .flexmasonry-item:nth-child(6n+4) { order: 4; }
.flexmasonry-cols-6 .flexmasonry-item:nth-child(6n+5) { order: 5; }
.flexmasonry-cols-6 .flexmasonry-item:nth-child(6n) { order: 6; }
.flexmasonry-cols-6 .flexmasonry-item:nth-child(6n + 1) {
order: 1;
}
.flexmasonry-cols-6 .flexmasonry-item:nth-child(6n + 2) {
order: 2;
}
.flexmasonry-cols-6 .flexmasonry-item:nth-child(6n + 3) {
order: 3;
}
.flexmasonry-cols-6 .flexmasonry-item:nth-child(6n + 4) {
order: 4;
}
.flexmasonry-cols-6 .flexmasonry-item:nth-child(6n + 5) {
order: 5;
}
.flexmasonry-cols-6 .flexmasonry-item:nth-child(6n) {
order: 6;
}

.flexmasonry-cols-7 .flexmasonry-item:nth-child(7n+1) { order: 1; }
.flexmasonry-cols-7 .flexmasonry-item:nth-child(7n+2) { order: 2; }
.flexmasonry-cols-7 .flexmasonry-item:nth-child(7n+3) { order: 3; }
.flexmasonry-cols-7 .flexmasonry-item:nth-child(7n+4) { order: 4; }
.flexmasonry-cols-7 .flexmasonry-item:nth-child(7n+5) { order: 5; }
.flexmasonry-cols-7 .flexmasonry-item:nth-child(7n+6) { order: 6; }
.flexmasonry-cols-7 .flexmasonry-item:nth-child(7n) { order: 7; }
.flexmasonry-cols-7 .flexmasonry-item:nth-child(7n + 1) {
order: 1;
}
.flexmasonry-cols-7 .flexmasonry-item:nth-child(7n + 2) {
order: 2;
}
.flexmasonry-cols-7 .flexmasonry-item:nth-child(7n + 3) {
order: 3;
}
.flexmasonry-cols-7 .flexmasonry-item:nth-child(7n + 4) {
order: 4;
}
.flexmasonry-cols-7 .flexmasonry-item:nth-child(7n + 5) {
order: 5;
}
.flexmasonry-cols-7 .flexmasonry-item:nth-child(7n + 6) {
order: 6;
}
.flexmasonry-cols-7 .flexmasonry-item:nth-child(7n) {
order: 7;
}

.flexmasonry-cols-8 .flexmasonry-item:nth-child(8n+1) { order: 1; }
.flexmasonry-cols-8 .flexmasonry-item:nth-child(8n+2) { order: 2; }
.flexmasonry-cols-8 .flexmasonry-item:nth-child(8n+3) { order: 3; }
.flexmasonry-cols-8 .flexmasonry-item:nth-child(8n+4) { order: 4; }
.flexmasonry-cols-8 .flexmasonry-item:nth-child(8n+5) { order: 5; }
.flexmasonry-cols-8 .flexmasonry-item:nth-child(8n+6) { order: 6; }
.flexmasonry-cols-8 .flexmasonry-item:nth-child(8n+7) { order: 7; }
.flexmasonry-cols-8 .flexmasonry-item:nth-child(8n) { order: 8; }
.flexmasonry-cols-8 .flexmasonry-item:nth-child(8n + 1) {
order: 1;
}
.flexmasonry-cols-8 .flexmasonry-item:nth-child(8n + 2) {
order: 2;
}
.flexmasonry-cols-8 .flexmasonry-item:nth-child(8n + 3) {
order: 3;
}
.flexmasonry-cols-8 .flexmasonry-item:nth-child(8n + 4) {
order: 4;
}
.flexmasonry-cols-8 .flexmasonry-item:nth-child(8n + 5) {
order: 5;
}
.flexmasonry-cols-8 .flexmasonry-item:nth-child(8n + 6) {
order: 6;
}
.flexmasonry-cols-8 .flexmasonry-item:nth-child(8n + 7) {
order: 7;
}
.flexmasonry-cols-8 .flexmasonry-item:nth-child(8n) {
order: 8;
}

.flexmasonry-break {
content: "";
content: '';
flex-basis: 100%;
width: 0 !important;
margin: 0;
}
.flexmasonry-break-1 { order: 1; }
.flexmasonry-break-2 { order: 2; }
.flexmasonry-break-3 { order: 3; }
.flexmasonry-break-4 { order: 4; }
.flexmasonry-break-5 { order: 5; }
.flexmasonry-break-6 { order: 6; }
.flexmasonry-break-7 { order: 7; }
.flexmasonry-break-1 {
order: 1;
}
.flexmasonry-break-2 {
order: 2;
}
.flexmasonry-break-3 {
order: 3;
}
.flexmasonry-break-4 {
order: 4;
}
.flexmasonry-break-5 {
order: 5;
}
.flexmasonry-break-6 {
order: 6;
}
.flexmasonry-break-7 {
order: 7;
}
Loading

0 comments on commit 45f3d4f

Please sign in to comment.