Skip to content

Instantly share code, notes, and snippets.

@clyfe
Created March 5, 2012 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clyfe/1982094 to your computer and use it in GitHub Desktop.
Save clyfe/1982094 to your computer and use it in GitHub Desktop.
AS and TB play nice
/* use with AS 3.2 */
.active-scaffold-header div.actions {
top: 0;
}
.active-scaffold {
input[type="submit"], input[type="reset"], button {
@extend .btn;
@extend .btn-primary;
margin-top: 0;
padding-top: 2px;
padding-bottom: 1px;
}
form.as_form.search {
input, select, textarea {
margin-bottom: 0;
}
}
a.as_cancel {
vertical-align: middle;
}
.active-scaffold ol {
display: table;
margin-left: 0;
}
}
@naaano
Copy link

naaano commented Apr 30, 2012

why margin-bottom: 0 for inputs? the form element look collapsed

@bencarsal
Copy link

/* with less, using twitter-bootstrap gem, i put this lines in bootstrap_and_overrides.css.less at the end of file:*/
.active-scaffold-header div.actions {
top: 0;
}
@tr-color-light: #FFF;
@tr-color-dark: #F9F9F9;

.active-scaffold {
input[type="submit"], input[type="reset"], button {
.btn;
.btn-primary;
margin-top: 0;
padding-top: 2px;
padding-bottom: 1px;
}
form.as_form {
.form-horizontal;
.search {
input, select, textarea {
margin-bottom: 0;
}
}
/label {
.form-horizontal .control-label;
};
/
}
a.as_cancel {
vertical-align: middle;
}
.active-scaffold ol {
display: table;
margin-left: 0;
}
div {
.table-responsive;
}
div.as_content {
table {
.table;
//.table-striped;
.table-bordered;
.table-hover;
//.dataTable; //no-footer
.table-bordered;
//.sortableTable;
tbody {
tr:nth-child(2n+1) {
background-color: @tr-color-dark;
td.sorted {
background-color: darken(@tr-color-dark, 3%);
border-bottom-color: darken(@tr-color-dark, 6%);
}
}
}
}
}
tr.record {
record {
background-color: @tr-color-light;
/*.even-record {
}
td.sorted {

  }*/
}

}
tr.even-record {
td.sorted {
background-color: darken(@tr-color-light, 3%);
border-bottom-color: darken(@tr-color-light, 6%);
}
}
input.text-input {
.form-control;
}
select {
//.input-sm;
.input-group-sm > .form-control;
}
label {
//.col-sm-4;
vertical-align: middle;
font-weight: bold;
max-width: 100%;
text-align: right;
padding-top: 7px;
margin-top: 0px;
margin-bottom: 0px;
//.has-success .control-label;
}
}

@smartlime
Copy link

I can't get nice look with BT.

Could you tell, where should I place this file in the project? In app/assets/stylesheets it has no effect.

Or I should override all the AS styles?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment