UNPKG

adxutil

Version:

Utilities tools for Askia Design eXtension

441 lines (392 loc) 9.09 kB
/* GLOBAL */ * { -webkit-tap-highlight-color: rgba(255,255,255,0); } body, html { -webkit-font-smoothing: antialiased !important; -moz-osx-font-smoothing: grayscale; text-shadow: none; text-rendering: optimizeLegibility !important; } body { display: flex; display: -webkit-box; /*display: -moz-box;*/ display: -ms-flexbox; display: -webkit-flex; flex-direction: column; -webkit-flex-direction: column; -ms-flex-direction: column; flex-wrap: nowrap; justify-content: space-between; align-items: stretch; align-content: center; min-height: 100vh; } ::-webkit-input-placeholder { color: #AAA; } ::-moz-placeholder { color: #AAA; } :-ms-input-placeholder { color: #AAA; } :-moz-placeholder { color: #AAA; } /* HEADER & RIBBON */ header.large { width: 100%; order: 1; flex: 0 0 100px; height: 100px; align-self: center; display: flex; display: -webkit-box; /*display: -moz-box;*/ display: -ms-flexbox; display: -webkit-flex; flex-direction: row; -webkit-flex-direction: row; -ms-flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: stretch; align-content: center; transition: height ease-in .3s, box-shadow ease-in .3s; } @-moz-document url-prefix() { header.large { flex: none; } } header.fixed { position: fixed; top: 0; z-index: 10000; height: 70px; } header .logo-survey { margin: auto 0 auto 0.5em; line-height: 130px; display: inline-block\9; margin: 0 0 0 0.5em\9; transition: line-height ease-in .3s; } header.fixed .logo-survey { line-height: 100px; } .logo-survey img { max-width: 200px; max-height: 50px; } header h2 { line-height: 2; order: 1; flex: 0 0 auto; transition: line-height ease-in .3s; display: inline-block\9; } header.fixed h2 { line-height: 1.2; } .ribbon { width: 100%; order: 2; flex: 0 0 20vh; align-self: center; -webkit-flex-shrink: 0; -ms-flex-negative: 0; flex-shrink: 0; height: 150px\9; } /* PROGRESS BAR */ .progressWrapper { order: 2; flex: 0 0 auto; transition: padding ease-in .3s; float: right\9; display: inline-block\9; } .progress { height: .9em; position: relative; width: 14em; } .progress-bar { height: 100%; position: absolute; } .progress-value { position: absolute; text-align: center; width: 100%; } @media screen and (min-width: 501px) and (max-width: 768px) { .progress { width: 11em; } } @media screen and (max-width: 500px) { .progress { width: 6em; } } /* MAIN QUESTION CONTAINER */ .main { width: 100%; order: 3; flex: 1 1 60vh; align-self: center; overflow: visible; margin-top: -15vh; margin-top: -120px\9; } @media all and (-ms-high-contrast:none) { .main { margin-top: -15vh; } /* IE10 */ } /* QUESTION CAPTION */ .askiaquestions { width: calc(100% - 30vw); } @media screen and (min-width: 501px) and (max-width: 768px) { .askiaquestions { width: calc(100% - 20vw); padding: 25px 20px; } } @media screen and (max-width: 500px) { .askiaquestions { width: calc(100% - 10vw); padding: 15px 10px; } } .instruction { margin-top: 2em; } /* RESPONSES */ .askia-response label.askia-response-label { cursor: pointer; margin-left: .8em; vertical-align: middle; transition: color linear .17s; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .askia-control > table { width: 100%; } .askia-grid-row .askia-response { cursor: pointer; margin-left: 0; } .askia-errors-summary ul { padding-left: 1em; } input[type=checkbox][id^=askia-input], input[type=radio][id^=askia-input] { vertical-align: middle; display: none; } input[type=checkbox] + label.askia-checkbox { display: inline-block; font-family: inherit; vertical-align: middle; -webkit-appearance: none; -moz-appearance: none; -ms-appearance: none; -o-appearance: none; appearance: none; background: #fff; border-radius: .125em; box-sizing: border-box; position: relative; cursor: pointer; animation: checkbox-1 .6s; transition: transform .3s cubic-bezier(.2, .3, 0, 1), box-shadow .3s cubic-bezier(.2, .3, 0, 1), border-color 0s linear .17s; } input[type=radio] + label.askia-radio, input[type=checkbox].askia-exclusive + label.askia-checkbox { display: inline-block; font-family: inherit; vertical-align: middle; -webkit-appearance: none; -moz-appearance: none; -ms-appearance: none; -o-appearance: none; appearance: none; background: #fff; border-radius: 50%; box-sizing: border-box; position: relative; cursor: pointer; animation: checkbox-1 .6s; transition: transform .3s cubic-bezier(.2, .3, 0, 1), box-shadow .3s cubic-bezier(.2, .3, 0, 1), border-color 0s linear .17s; } input[type=checkbox]:focus + label.askia-checkbox, input[type=radio]:focus + label.askia-radio { outline: none; } input[type=checkbox]:active + label.askia-checkbox, input[type=radio]:active + label.askia-radio { transform: scale(.8); } input[type=checkbox] + label.askia-checkbox:before, input[type=checkbox] + label.askia-checkbox:after, input[type=radio] + label.askia-radio:before, input[type=radio] + label.askia-radio:after { content: ''; background: #fff; height: 1em; width: 1em; position: absolute; transform: translate(.2728em, .4279em) rotate(44.91deg) scale(.3411, .1); transform-origin: 0 0; transition: transform .3s cubic-bezier(.2, .3, 0, 1), opacity .3s cubic-bezier(.2, .3, 0, 1); } input[type=checkbox] + label.askia-checkbox:after, input[type=radio] + label.askia-radio:after { transform: translate(.8494em, .35em) rotate(135.22deg) scale(.5612, .1); } input[type=checkbox]:not(:checked) + label.askia-checkbox:before, input[type=radio]:not(:checked) + label.askia-radio:before { transform: translate(.505em, .455em) rotate(44.91deg) scale(.1, .1); } input[type=checkbox]:not(:checked) + label.askia-checkbox:after, input[type=radio]:not(:checked) + label.askia-radio:after { transform: translate(.575em, .525em) rotate(135.22deg) scale(.1, .1); } @keyframes checkbox-1 { 0% { transform: scale(0); } 48% { transform: scale(1.2); } } input[type=number] { min-width: 8em; text-align: right; } input[type=text] { width: 100%; min-width: 80%; max-width: 90%; } input[type=text], input[type=number] { outline: none; border-radius: .125em; transition: border cubic-bezier(.2, .3, 0, 1) .17s; } textarea { outline: none; resize: vertical; width: 94%; border-radius: .125em; transition: border cubic-bezier(.2, .3, 0, 1) .17s; } @media screen and (min-width: 501px) and (max-width: 768px) { textarea { width: 92%; } } @media screen and (max-width: 500px) { textarea { width: 88%; } } /* NAVIGATION */ .btn:after { content: ''; position: absolute; border-radius: 50%; height: 5em; width: 5em; top: -1.3em; left: 50%; margin-left: -2.5em; opacity: 0; transform: scale(0.2); transition: all 150ms cubic-bezier(0.25, 0.1, 0.25, 0.1); } .btn:focus:after { transform: scale(2); opacity: 1; } .keyframe:focus:after { animation: ripple 300ms linear forwards; } @keyframes ripple { 0% { transform: scale(0.2); opacity: 0; } 50% { opacity: 1; } 100% { transform: scale(2); opacity: 0; } } .btn { cursor: pointer; position: relative; width: 5.5em; border: none; -webkit-background-clip: padding-box; -moz-background-clip: padding; background-clip: padding-box; margin: .4em; overflow: hidden; -webkit-appearance: none; transition: all .3s cubic-bezier(0.25, 0.1, 0.25, 0.1); } .btn:active { transform: scale(0.98); } .secondary.disabled { opacity: .5; cursor: not-allowed; } *:focus { outline: 0; } /* FOOTER */ footer { width: 100%; order: 4; flex: 0 0 50px; align-self: center; display: flex; display: -webkit-box; /*display: -moz-box;*/ display: -ms-flexbox; display: -webkit-flex; flex-direction: row; -webkit-flex-direction: row; -ms-flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center; align-content: center; position: fixed\9; bottom: 0\9; height: 50px\9; z-index: 10000\9; } @media all and (-ms-high-contrast:none) { footer { position: fixed; bottom: 0; height: 50px; z-index: 10000; } /* IE10 */ *::-ms-backdrop, footer { position: fixed; bottom: 0; height: 50px; z-index: 10000; } /* IE11 */ } .footerLeft { order: 1; flex: 0 1 auto; text-align: left; } .footerRight { order: 2; flex: 0 1 auto; text-align: right; }