Skip to content

Commit

Permalink
updated to v2 variables
Browse files Browse the repository at this point in the history
  • Loading branch information
kirsty-hames committed Sep 7, 2015
1 parent 6c9d762 commit 88baac4
Showing 1 changed file with 86 additions and 91 deletions.
177 changes: 86 additions & 91 deletions less/gmcq.less
Original file line number Diff line number Diff line change
@@ -1,62 +1,63 @@
.gmcq-component {

.gmcq-item {
position:relative;
width:50%;
margin-bottom:8px;
float:left;
position: relative;
width: 50%;
margin-bottom: @item-margin-bottom;
float: left;
.dir-rtl & {
float:right;
float: right;
}

&.even {
label {
margin-left:5%;
.dir-rtl & {
margin-left:inherit;
margin-right:5%;
}
margin-left: 5%;
.dir-rtl & {
margin-left: inherit;
margin-right: 5%;
}
}
}

&.odd {

label {
margin-right:5%;
margin-right: 5%;
.dir-rtl & {
margin-right:inherit;
margin-left:5%;
margin-right: inherit;
margin-left: 5%;
}
}
}

@media all and (max-width:760px) {
width:100%;
&.even, &.odd {
width: 100%;
&.even,
&.odd {
label {
margin-left:0%;
margin-right:0%;
margin-left: 0%;
margin-right: 0%;
}
}
}
}

.gmcq-item label {
color:@item-text-color;
display:block;
border:@item-border;
margin-bottom:2px;
position:relative;
z-index:1;
background-color:@item-color;
overflow:hidden;
cursor:pointer;
color: @item-text-color;
display: block;
border: @item-border;
margin-bottom: @item-margin-bottom;
position: relative;
z-index: 1;
background-color: @item-color;
overflow: hidden;
cursor: pointer;

img {
vertical-align:bottom;
vertical-align: bottom;
}

.gmcq-answer-icon {
color:@item-text-color;
color: @item-text-color;
&.radio {
width: @icon-size + 2;
height: @icon-size + 2;
Expand All @@ -65,159 +66,153 @@
}
}
&.checkbox {
&:before {
content: " ";
}
border: 3px solid @item-text-color;
width:18px;
height:18px;
font-size:18px;
width: 18px;
height: 18px;
font-size: 18px;
font-weight: bold;
border-radius: 2px;
&:before {
content: " ";
}
}
}

&.selected {
color:@item-text-selected-color;
background-color:@item-selected-color;
color: @item-text-color-selected;
background-color: @item-color-selected;

.gmcq-answer-icon {
&.radio {
&:before {
content: "\e65d";
}
}
&.checkbox {
border: @item-border;
border-color: @item-text-color-selected;
width: 18px;
height: 18px;
font-size: 18px;
font-weight: bold;
border-radius: 2px;
&:before {
content: "\e633";
}
border: 3px solid @item-text-selected-color;
width:18px;
height:18px;
font-size:18px;
font-weight: bold;
border-radius: 2px;
}
}
.gmcq-item-icon {
color:@item-text-selected-color;
}
}
}

.gmcq-item-inner {
padding:14px;
margin-left:38px;
padding: @item-padding;
padding-left: (@icon-size+(@item-padding-left*2));
.dir-rtl & {
margin-left:inherit;
margin-right:38px;
margin-left: inherit;
padding-right: (@icon-size+(@item-padding-left*2));
}
padding-top:19px;
}

.gmcq-item input {
position:absolute;
position: absolute;
top: 25px;
left:25px;
left: 25px;
.dir-rtl & {
left:inherit;
right:25px;
left: inherit;
right: 25px;
}
}

.gmcq-item-checkbox {
position:relative;
position: relative;
}

.gmcq-item-state {
background:none;
position:absolute;
left:10px;
background: none;
position: absolute;
width: @icon-size;
height: @icon-size;
top: 50%;
margin-top: -(@icon-size/2);
left: 10px;
z-index: 0;
.dir-rtl & {
left:inherit;
right:10px;
left: inherit;
right: 10px;
}
width:@icon-size;
height:@icon-size;
top:50%;
margin-top:-(@icon-size/2);
z-index:0;
}

.gmcq-correct-icon {
color:@icon-correct-color;
display:none;
color: @validation-success;
display: none;
}

.gmcq-incorrect-icon {
color:@icon-incorrect-color;
display:none;
color: @validation-error;
display: none;
}

.gmcq-widget {

&.show-user-answer {
.gmcq-item-icon {
display:none;
display: none;
}
.incorrect {
.selected .gmcq-incorrect-icon {
display:block;
display: block;
}
}
.correct {
.selected .gmcq-correct-icon {
display:block;
display: block;
}
}
}

&.show-correct-answer {
.gmcq-item-icon {
display:none;
display: none;
}
.selected .gmcq-correct-icon {
display:block;
display: block;
}
}

&.disabled {
.gmcq-item label.selected.disabled {
background-color:@item-selected-color;
cursor:default;
background-color: @item-color-selected;
cursor: default;
}
.gmcq-item label.disabled {
color:@item-text-disabled-color;
background-color:@item-disabled-color;
border-color:@item-border-disabled-color;
cursor:default;
color: @item-text-color-disabled;
background-color: @item-color-disabled;
border-color: @item-border-color-disabled;
cursor: default;
}

.gmcq-item.correct .selected .state {
color:@icon-correct-color;
color: @validation-success;
}

.gmcq-item.incorrect .selected .state {
color:@icon-incorrect-color;
color: @validation-error;
}
}

}
}

.no-touch {

.gmcq-component {

.gmcq-widget {
&:not(.disabled) {
.gmcq-item label:hover {
color:@item-text-hover-color;
background-color:@item-hover-color;
color: @item-text-color-hover;
background-color: @item-color-hover;
.gmcq-item-icon {
color:@item-text-hover-color;
color: @item-text-color-hover;
}
}
}
}
}
}
}

0 comments on commit 88baac4

Please sign in to comment.