silex-website-builder-goodevent
Version:
Free and easy website builder for everyone.
237 lines (232 loc) • 5.63 kB
CSS
/**
* This file holds the basic CSS styles of Silex websites
*/
/* pages */
.page-element{
display: none;
}
.paged-element{
display: none;
}
.silex-published .paged-element{
display: block;
}
/* default style for silex elements */
.editable-style{
position: absolute;
box-sizing: content-box; /* this is needed to set the size of elements with a border (though it could be omited since this is the default value) */
}
.silex-element-content{
overflow: hidden;
border-radius: initial;
width: 100%;
}
.silex-element-content {
pointer-events: none;
}
.silex-element-content[contenteditable="true"] {
min-height: 20px;
cursor: text;
pointer-events: auto;
}
.editable-style.silex-selected.text-editor-focus {
/* remove text box selection markers
box-shadow: none;
*/
/* a click on current text box will select it */
cursor: pointer;
}
.text-editor-focus .ui-resizable-handle {
/* remove text box UI handles for resize */
display: none;
}
.section-element > .silex-element-content {
/* section have a content element, and it needs to keep pointer events
because it container other silex elements
*/
pointer-events: auto;
}
body.silex-runtime .silex-element-content {
pointer-events: auto;
}
/* needed to have the content 100% height but mess up with UI
.html-element .silex-element-content{
position: absolute;
}
*/
.editable-style.section-element {
position: relative;
left: 0;
top: 0;
right: 0;
padding: 15px 100px;
margin: 5px 5px;
}
.silex-runtime .editable-style.section-element {
padding: 0;
margin: 0;
margin-top: -1px;
}
.default-site-width, /* for backward compat, FIXME: remove in a while */
.website-width {
width: 960px;
}
.section-element .silex-container-content {
position: relative;
left: 0;
top: 0;
margin-left: auto;
margin-right: auto;
overflow: initial;
}
/* background */
.background{
position: relative ;
left: 0 ;
top: 0 ; /* !important is useful while editing */
margin-left: auto;
margin-right: auto;
z-index: 1;
}
/* resize */
.editable-style.image-element .silex-element-content{
position: absolute;
border-radius: inherit; /* this is to follow the element's radius */
height: 100%;
}
/* wysihtml text editor styles */
.wysiwyg-float-left {
float: left;
margin: 0 8px 8px 0;
}
.wysiwyg-float-right {
float: right;
margin: 0 0 8px 8px;
}
/* Remove dots surrounding links in Firefox
because of normalize.css */
a:focus{ outline: none;}
body.silex-runtime .editable-style[data-silex-href] {
cursor: pointer;
}
body.enable-mobile .editable-style.hide-on-desktop {
display: none;
}
/* mobile hamburger menu */
body.enable-mobile .silex-pages .menu-button {
left: 105%;
top: 10px;
position: absolute;
cursor: pointer;
border-radius: 6px;
}
/* mobile side bar */
body.enable-mobile .silex-pages {
position: fixed;
z-index: 999999;
width: 80%;
height: 100%;
background-color: #4C4C4C;
right: 100%;
top: 0;
transition: right .1s ease-out;
border-style: solid;
border-width: 0 1px 0 0;
border-color: #8E8E8E;
}
body.enable-mobile.show-mobile-menu {
cursor: pointer;
}
body.enable-mobile.show-mobile-menu .silex-pages {
right: 20%;
overflow-y: auto;
overflow-x: hidden;
}
body.enable-mobile .page-element {
display: block;
cursor: pointer;
padding: 1em;
font-size: 1.6em;
color: #FFFFFF;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
body.enable-mobile .page-element.page-link-active {
background-color: #262626;
}
/* elements styles */
body.enable-mobile .background {
height: initial;
padding-bottom: 50px;
}
/* Mobile styles */
@media (max-width:480px) {
/* hide horizontal scroll bar which appears because of residual values in css
html {
overflow-x: hidden;
}
*/
body {
position: initial; /* used to be absolute but now only in editor (editable.css), when position is absolute the body has the size of its content */
}
/* mobile mode */
body.enable-mobile .editable-style:not(.prevent-mobile-style),
body.enable-mobile .background.background-initial {
position: relative;
top: auto;
left: auto;
max-width: 95%; /* less than 100% in the editor to be able to resize container */
min-width: auto; /* this is to remove sections min-width, since section min-width is set to the witdh of its content in Element::setStyle() */
margin-left: auto;
margin-right: auto;
}
body.enable-mobile .editable-style.section-element {
max-width: 100%; /* section bg should be 100% width because user do not need to grab the side and resize */
padding: 0;
margin: 0;
}
body.enable-mobile .container-element {
display: flex;
align-items: center;
justify-content: space-around;
flex-wrap: wrap;
height: fit-content;
}
/* but still hide paged elements or desktop only elements */
.paged-element-hidden.paged-element.editable-style {
display: none;
}
body.enable-mobile .editable-style.hide-on-mobile {
display: none;
}
body.enable-mobile .editable-style.hide-on-desktop {
display: initial;
}
body.silex-runtime.enable-mobile .background.background-initial {
max-width: 100%;
}
}
/**
* prodotype components
*/
.silex-element-content-full-height .silex-element-content {
height: 100%;
}
.prodotype-runtime {
display: none;
}
body.silex-runtime .prodotype-runtime {
display: block;
}
body.silex-runtime .prodotype-preview {
display: none;
}
.prodotype-force-size {
position: absolute;
width: 100%;
height: 100%;
}
.silex-component-button button {
width: 100%;
}