Skip to content

Commit

Permalink
Added default CSS styles to make rows and columns work out of the box
Browse files Browse the repository at this point in the history
  • Loading branch information
hingst committed Sep 25, 2015
1 parent 1132161 commit 3f414c6
Show file tree
Hide file tree
Showing 13 changed files with 1,553 additions and 250 deletions.
4 changes: 1 addition & 3 deletions .gitignore
@@ -1,3 +1 @@
/.idea
_testing.txt
vendor/
.idea/
1,020 changes: 1,019 additions & 1 deletion assets/css/editor.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/editor.css.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/css/editor.scss
Expand Up @@ -1204,6 +1204,7 @@ $darkgray: #CCCCCC;

.layotter-default-value {
cursor: pointer;
font-size: 12px;
}

.layotter-row-layout-option {
Expand Down
70 changes: 70 additions & 0 deletions assets/css/frontend.css

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

7 changes: 7 additions & 0 deletions assets/css/frontend.css.map

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

88 changes: 88 additions & 0 deletions assets/css/frontend.scss
@@ -0,0 +1,88 @@
.lo-row {
margin-bottom: 20px;
margin-left: -10px;
margin-right: -10px;

@media only screen and (max-width: 700px) {
margin-bottom: 0;
}

&:after {
content: '';
clear: both;
display: block;
}

.lo-col-size1of12 {
width: 8.33333%;
}

.lo-col-size2of12 {
width: 16.66666%;
}

.lo-col-size3of12 {
width: 25%;
}

.lo-col-size4of12 {
width: 33.33333%;
}

.lo-col-size5of12 {
width: 41.66666%;
}

.lo-col-size6of12 {
width: 50%;
}

.lo-col-size7of12 {
width: 58.33333%;
}

.lo-col-size8of12 {
width: 66.66666%;
}

.lo-col-size9of12 {
width: 75%;
}

.lo-col-size10of12 {
width: 83.33333%;
}

.lo-col-size11of12 {
width: 91.66666%;
}

.lo-col-size12of12 {
width: 100%;
}

.lo-col-size1of12,
.lo-col-size2of12,
.lo-col-size3of12,
.lo-col-size4of12,
.lo-col-size5of12,
.lo-col-size6of12,
.lo-col-size7of12,
.lo-col-size8of12,
.lo-col-size9of12,
.lo-col-size10of12,
.lo-col-size11of12,
.lo-col-size11of12 {
box-sizing: border-box;
padding: 0 10px;
float: left;
min-height: 1px;

@media only screen and (max-width: 700px) {
float: none;
min-height: 0;
width: auto;
margin-bottom: 20px;
}
}
}
11 changes: 11 additions & 0 deletions core/assets.php
Expand Up @@ -178,4 +178,15 @@ function layotter_assets_admin_enqueue_scripts() {
)
);

}


/**
* Include basic CSS in the frontend if enabled in settings
*/
add_action('wp_enqueue_scripts', 'layotter_frontend_assets');
function layotter_frontend_assets() {
if (!is_admin() AND Layotter_Settings::default_css_enabled()) {
wp_enqueue_style('layotter-frontend', plugins_url('assets/css/frontend.css', __DIR__));
}
}

0 comments on commit 3f414c6

Please sign in to comment.