Skip to content

Commit

Permalink
added more strength to the css to override site styles, focus on butt…
Browse files Browse the repository at this point in the history
…ons and tabs and form prepend
  • Loading branch information
Jon Price authored and Sebastian Vetter committed Aug 14, 2013
1 parent 8421b73 commit aea22c9
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 27 deletions.
5 changes: 4 additions & 1 deletion fancypages/static/fancypages/less/buttons.less
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
.fp-btn {
.fp-btn,
button.fp-btn,
a.fp-btn {
display: inline-block;
*display: inline;
*zoom: 1;
padding: 4px 12px;
margin-bottom: 0;
font-size: 14px;
line-height: 20px;
height:auto;
text-align: center;
text-transform: capitalize;
vertical-align: middle;
Expand Down
4 changes: 3 additions & 1 deletion fancypages/static/fancypages/less/editor.less
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
border-bottom:1px solid @grayLight;
margin-bottom:@baseLineHeight;
font-size:@baseFontSize + 4;
text-transform: capitalize;
span {
font-size:18px;
}
Expand Down Expand Up @@ -137,10 +138,11 @@
}
}
//Editor CLose
//!importants are here because these tabs are inside a modal in the site markup
.fp-editor-controls {
border-bottom:1px solid @grayDarker;
.clearfix();
.fp-close {
button.fp-close {
color: #fff;
padding: 15px;
background: #555;
Expand Down
67 changes: 53 additions & 14 deletions fancypages/static/fancypages/less/forms.less
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Set font for forms
#block_input_wrapper {
label,
input,
button,
select,
textarea {
label,
input,
button,
select,
textarea {
#font > .shorthand(@baseFontSize,normal,@baseLineHeight); // Set size, weight, line-height here
}
input,
Expand All @@ -18,6 +18,7 @@
label {
display: block;
margin-bottom: 5px;
text-transform: capitalize;
}

// Form controls
Expand Down Expand Up @@ -184,7 +185,8 @@
// ------------

// Allow us to put symbols and text within the input field for a cleaner look
.input-append {
.input-append,
.input-prepend {
display: inline-block;
margin-bottom: @baseLineHeight / 2;
vertical-align: middle;
Expand All @@ -193,12 +195,14 @@

// Reset the white space collapse hack
input,
select {
select,
.uneditable-input {
font-size: @baseFontSize;
}

input,
select {
select,
.uneditable-input {
position: relative; // placed here by default so that on :focus we can place the input above the .add-on for full border and box-shadow goodness
margin-bottom: 0; // prevent bottom margin from screwing up alignment in stacked forms
*margin-left: 0;
Expand All @@ -210,26 +214,61 @@
z-index: 2;
}
}

.fp-btn {
.add-on {
display: inline-block;
width: auto;
height: @baseLineHeight;
min-width: 16px;
padding: 4px 5px;
font-size: @baseFontSize;
font-weight: normal;
line-height: @baseLineHeight;
text-align: center;
text-shadow: 0 1px 0 @white;
background-color: @grayLighter;
border: 1px solid #ccc;
}
.add-on,
.fp-btn,
.fp-btn-group > .dropdown-toggle {
vertical-align: top;
.border-radius(0);
}
.active {
background-color: lighten(@green, 30);
border-color: @green;
}
}

.input-prepend {
.add-on,
.fp-btn {
margin-right: -1px;
}
.add-on:first-child,
.fp-btn:first-child {
// FYI, `.btn:first-child` accounts for a button group that's prepended
.border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
}
}

.input-append {
input,
select {
select,
.uneditable-input {
.border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
+ .fp-btn-group .btn:last-child {
+ .fp-btn-group .fp-btn:last-child {
.border-radius(0 @inputBorderRadius @inputBorderRadius 0);
}
}
.fp-btn {
.add-on,
.fp-btn,
.fp-btn-group {
margin-left: -1px;
}
.fp-btn:last-child {
.add-on:last-child,
.fp-btn:last-child,
.fp-btn-group:last-child > .dropdown-toggle {
.border-radius(0 @inputBorderRadius @inputBorderRadius 0);
}
}
Expand Down
8 changes: 7 additions & 1 deletion fancypages/static/fancypages/less/modal.less
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
margin: 0;
line-height: 30px;
font-size:@baseFontSize + 4;
text-transform: capitalize;
}
}

Expand Down Expand Up @@ -97,19 +98,24 @@
}
}

.fp-close {
.fp-close,
button.fp-close {
float: right;
font-size: 20px;
font-weight: bold;
line-height: @baseLineHeight;
color: @black;
height:auto;
text-shadow: 0 1px 0 rgba(255,255,255,1);
.opacity(20);
&:hover,
&:focus {
color: @black;
text-decoration: none;
cursor: pointer;
background:none;
.box-shadow(none);
.border-radius(0);
.opacity(40);
}
}
Expand Down
8 changes: 4 additions & 4 deletions fancypages/static/fancypages/less/tabs.less
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// BASE CLASS
// ----------

//!importants are here because these tabs are inside a modal in the site markup
.fp-nav-tabs {
margin-left: 0;
margin: 0 0 @baseLineHeight!important;
padding-left:0;
margin-bottom: @baseLineHeight;
list-style: none;
.clearfix();
}
Expand All @@ -21,7 +20,8 @@
max-width: none;
}
.fp-nav-tabs > li {
float: left;
float: left!important;
width:auto!important;
}
.fp-nav-tabs > li > a {
display: block;
Expand Down
12 changes: 6 additions & 6 deletions fancypages/static/fancypages/less/widgets.less
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@

//Widget Modal Add Content Labels
.fp-widget-list {
margin: 0;
padding:0;
margin: 0!important;
padding:0!important;
.clearfix();
> li {
display: block;
display: block!important;
list-style: none;
float: left;
margin: 0 10px 20px;
width: 200px;
float: left!important;
margin: 0 10px 20px!important;
width: 200px!important;
}
span {
min-height:45px;
Expand Down

0 comments on commit aea22c9

Please sign in to comment.