blob: edd83e91ced331597420852923b2171d99a77067 [file] [log] [blame]
@charset "utf-8";
@import "../util";
/**
* Virtual Collection Builder
*/
$left-padding: 4em;
$bracket-size: .4em;
// Rules for VC view (including fragments)
.vc {
margin-top: 4pt;
.builder {
position: initial;
}
.docGroup {
position: relative;
display: inline-block;
margin-left: $left-padding;
padding: 4pt 2pt 4pt 0pt;
.docGroup {
display: block;
}
border: {
radius: $standard-border-radius * 2;
style: solid;
width: 0 $bracket-size;
}
&[data-operation] {
> .doc:first-child::before,
> .docGroup:first-child::before {
content: none;
}
> .doc::before,
> .docGroup::before {
position: absolute;
display: inline-block;
text-align: right;
width: $left-padding;
margin-left: -1 * ($left-padding + .5em);
line-height: 1.5em;
border-top: $border-size solid transparent;
}
> .docGroup::before {
margin-left: -1 * ($left-padding + .5em) + (-1 * $bracket-size);
}
}
// Or operation
&[data-operation=or] {
> .doc::before,
> .docGroup::before {
// This will be overruled by JS!
content: "or";
}
}
// And operation
&[data-operation=and] {
> .doc::before,
> .docGroup::before {
// This will be overruled by JS!
content: "and";
}
}
/**
* All operators on groups
*/
> .operators {
position: absolute;
display: block;
vertical-align: middle;
top: 10px;
left: 3px;
margin-left: 100%;
padding: 0;
> span:first-child {
border: {
top-left-radius: 0;
bottom-left-radius: 0;
}
}
}
}
/**
* All document rules
*/
.doc {
line-height: 170%;
padding-left: $left-padding;
> span {
+ span,
+ div + span,
+ ul + span {
margin-left: 5pt;
}
&.key,
&.value {
font-weight: bold;
}
&.value[data-type=regex] {
font-style: italic;
&::after,
&::before {
content: '/';
}
}
&.key {
position: relative;
> ul {
margin: 0;
margin-left: 3.3em;
}
&.fixed {
color: $light-green;
}
}
}
// Unspecified value
&.unspecified > span,
span.unspecified {
@include choose-item;
padding: 0 4px;
box-shadow: $choose-box-shadow;
border: {
style: solid;
width: $border-size;
radius: $standard-border-radius;
}
}
// All operators on docs
> .operators {
display: inline-block;
margin-left: 10px;
}
}
.rewritten .rewrite {
display: inline-block;
margin-left: 4pt;
color: $dark-orange;
&::after {
@include icon-font;
font-style: normal;
font-weight: normal;
content: $fa-rewrite;
text-decoration: underline;
}
> span {
display: none;
}
}
/**
* All operators
*/
.operators {
opacity: 0;
white-space: nowrap;
padding: 0;
font-size: 0;
line-height: 0;
text-align: center;
}
> .docGroup {
margin-left: 0;
}
.menu {
display: inline-block;
}
// referTo entries
.menu li[data-type=ref]::before,
span.key.ref::before {
@include icon-font;
content: $fa-referto;
padding-right: 4pt;
font: {
style: normal;
weight: normal;
}
}
div.value {
position: absolute;
display: inline-block;
min-width: max-content;
z-index: 8000;
padding: 4pt;
margin-top: -6pt;
border: {
radius: $standard-border-radius;
width: $border-size;
style: solid;
}
input {
border-width: 0;
outline-width: 0;
}
> div {
@include choose-item;
display: inline-block;
padding: 0 4pt;
margin-left: 4pt;
font: {
size: 80%;
style: italic;
}
border: {
width: $border-size;
style: solid;
radius: $standard-border-radius;
}
}
&.regex {
> input {
font-style: italic;
}
> div {
@include choose-active;
}
}
}
}
/* Rules for vcs excluding fragments,
* i.e. includingy dynamic changes.
*/
.vc:not(.fragment) {
.docGroup,
.doc {
color: $dark-grey;
}
/**
* Rules for all docGroups
*/
// Whiten on hover
.docGroup:hover {
background-color: rgba(255,255,255,.3);
}
.doc > span:not(.fixed) {
cursor: pointer;
&:hover {
color: $dark-orange;
}
}
// Unspecified value
.doc.unspecified > span,
span.unspecified {
&:hover {
@include choose-hover;
}
}
.doc, .docGroup {
&:hover > .operators {
opacity: 1;
}
}
.docGroup {
&[data-operation] {
> .doc::before,
> .docGroup::before {
color: $dark-orange;
}
}
&[data-operation=or] {
border-color: $dark-orange;
}
}
div.value {
@include choose-item;
box-shadow: $choose-box-shadow;
> div {
cursor: pointer;
&:hover {
@include choose-hover;
}
}
}
}
/**
* The z-index cascade for groups.
*/
$dg-index : 30;
.docGroup {
> .operators {
z-index: $dg-index;
}
.docGroup {
> .operators {
z-index: $dg-index + 1;
}
.docGroup {
> .operators {
z-index: $dg-index + 2;
}
.docGroup {
> .operators {
z-index: $dg-index + 3;
}
.docGroup {
> .operators {
z-index: $dg-index + 4;
}
.docGroup {
> .operators {
z-index: $dg-index + 5;
}
.docGroup {
> .operators {
z-index: $dg-index + 6;
}
}
}
}
}
}
}
}
.vc.fragment {
> div > div.docGroup {
margin-left: 0;
}
.doc {
margin-right: 2em;
}
}
#collection {
line-height: 1em;
border-radius: $standard-border-radius;
}
#vc-choose > span.rewritten::after {
@include icon-font;
color: $dark-orange;
padding: 0;
padding-left: 4px;
content: $fa-rewrite;
text-decoration: underline;
font-style: normal;
font-weight: normal;
}
div#vc-view {
position:relative;
> div.vc {
display: none;
margin: 1.3em 0 .5em 0;
border: 2px solid $dark-green;
background-color: $nearly-white;
&.active {
display: block;
}
> div:first-child {
padding: 1.3em;
}
}
}
div.panel.vcinfo {
padding: 3pt 0pt 3pt 3pt;
background-color: $dark-green;
div.button-group > span {
box-shadow: none;
}
}