mirror of
https://github.com/jasny/bootstrap.git
synced 2026-04-24 03:00:49 -04:00
119 lines
2.4 KiB
Plaintext
119 lines
2.4 KiB
Plaintext
// Fileupload.less
|
|
// CSS for file upload button and fileupload widget
|
|
// ------------------------------------------------
|
|
|
|
.btn-file {
|
|
overflow: hidden;
|
|
position: relative;
|
|
vertical-align: middle;
|
|
> input {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
margin: 0;
|
|
opacity: 0;
|
|
filter: alpha(opacity=0);
|
|
transform: translate(-300px, 0) scale(4);
|
|
font-size: 23px;
|
|
direction: ltr;
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
|
|
.fileupload {
|
|
margin-bottom: 9px;
|
|
display: inline-block;
|
|
.uneditable-input {
|
|
display: inline-block;
|
|
margin-bottom: 0px;
|
|
vertical-align: middle;
|
|
cursor: text;
|
|
}
|
|
.thumbnail {
|
|
overflow: hidden;
|
|
display: inline-block;
|
|
margin-bottom: 5px;
|
|
vertical-align: middle;
|
|
text-align: center;
|
|
> img {
|
|
max-height: 100%;
|
|
}
|
|
}
|
|
.btn {
|
|
vertical-align: middle;
|
|
}
|
|
}
|
|
.fileupload-exists .fileupload-new,
|
|
.fileupload-new .fileupload-exists {
|
|
display: none;
|
|
}
|
|
.fileupload-inline .fileupload-controls {
|
|
display: inline;
|
|
}
|
|
|
|
.fileupload .uneditable-input {
|
|
white-space: normal;
|
|
}
|
|
|
|
.thumbnail-borderless .thumbnail {
|
|
border: none;
|
|
padding: 0;
|
|
.box-shadow(none);
|
|
}
|
|
|
|
// Not 100% correct, but helps in typical use case
|
|
.fileupload-new .input-group .btn-file {
|
|
border-radius: 0 @border-radius-base @border-radius-base 0;
|
|
}
|
|
.fileupload-new .input-group .btn-file.btn-xs,
|
|
.fileupload-new .input-group .btn-file.btn-sm {
|
|
border-radius: 0 @border-radius-small @border-radius-small 0;
|
|
}
|
|
.fileupload-new .input-group .btn-file.btn-lg {
|
|
border-radius: 0 @border-radius-large @border-radius-large 0;
|
|
}
|
|
|
|
.form-group.has-warning .fileupload {
|
|
.uneditable-input {
|
|
color: @state-warning-text;
|
|
border-color: @state-warning-border;
|
|
}
|
|
.fileupload-preview {
|
|
color: @state-warning-text;
|
|
}
|
|
.thumbnail {
|
|
border-color: @state-warning-border;
|
|
}
|
|
}
|
|
.form-group.has-error .fileupload {
|
|
.uneditable-input {
|
|
color: @state-danger-text;
|
|
border-color: @state-danger-border;
|
|
}
|
|
.fileupload-preview {
|
|
color: @state-danger-text;
|
|
}
|
|
.thumbnail {
|
|
border-color: @state-danger-border;
|
|
}
|
|
}
|
|
.form-group.has-success .fileupload {
|
|
.uneditable-input {
|
|
color: @state-success-text;
|
|
border-color: @state-success-border;
|
|
}
|
|
.fileupload-preview {
|
|
color: @state-success-text;
|
|
}
|
|
.thumbnail {
|
|
border-color: @state-success-border;
|
|
}
|
|
}
|
|
|
|
|
|
// Input group fixes
|
|
|
|
.input-group-addon:not(:first-child) {
|
|
border-left: 0;
|
|
}
|