Шаблон:Wikidata/FamilyTree/styles.css

.wikidata-familyTree table {
    border-collapse: separate;
    border-spacing: 0;
}

/* Толщина должна совпадать с толщиной NESW-линий */
.wikidata-familyTree .Q {
	background-color: var(--background-color-interactive-subtle, #f8f9fa);
    border: 1px var(--border-color-interactive, #72777d) solid;
    padding: .1em .25em;
    text-align: center;
}

.wikidata-familyTree-vertical .wikidata-familyTree .Z {
    min-width: 1em;
    height: 1em;
}

.wikidata-familyTree-horizontal .wikidata-familyTree .Z {
    min-width: 1em;
    height: .25em;
}

.wikidata-familyTree-vertical .line {
    position: relative;
    height: 0.5em;
}

.wikidata-familyTree-horizontal .line {
    position: relative;
    min-width: 2em;
}

.wikidata-familyTree-horizontal .NS {
    min-width: .5em;
}

/* Должно быть меньше основного текста .Q */
.wikidata-familyTree .Q .years {
	font-size: 85%;
}

.wikidata-familyTree .line .N,
.wikidata-familyTree .line .E,
.wikidata-familyTree .line .S,
.wikidata-familyTree .line .W {
  background-color: var(--border-color-interactive, #72777d);
  display: inline;
  position: absolute;
  height: 1px;
  width: 1px;
  top: 50%;
  left: 50%;
}

.wikidata-familyTree .line .N {
  height: calc(50% + 1px);
  top: 0;
}
.wikidata-familyTree .line .E {
  width: 50%;
}
.wikidata-familyTree .line .S {
  height: calc(50% + 1px);
}
.wikidata-familyTree .line .W {
  width: calc(50% + 1px);
  left: 0%;
}

.wikidata-familyTree-decorate-by-generation .gen0 {
	background-color: #fcc;
}

.wikidata-familyTree-decorate-by-generation .gen1,
.wikidata-familyTree-decorate-by-generation .gen-1 {
	background-color: #fb9;
}

.wikidata-familyTree-decorate-by-generation .gen2,
.wikidata-familyTree-decorate-by-generation .gen-2 {
	background-color: #ffc;
}

.wikidata-familyTree-decorate-by-generation .gen3,
.wikidata-familyTree-decorate-by-generation .gen-3 {
	background-color: #bfc;
}

.wikidata-familyTree-decorate-by-generation .gen4,
.wikidata-familyTree-decorate-by-generation .gen-4 {
	background-color: #9fe;
}

@media screen {
	html.skin-theme-clientpref-night .wikidata-familyTree-decorate-by-generation .gen0 {
		background-color: #421211; /* red800 */
	}
	
	html.skin-theme-clientpref-night .wikidata-familyTree-decorate-by-generation .gen1,
	html.skin-theme-clientpref-night .wikidata-familyTree-decorate-by-generation .gen-1 {
		background-color: #3a1908;
	}
	
	html.skin-theme-clientpref-night .wikidata-familyTree-decorate-by-generation .gen2,
	html.skin-theme-clientpref-night .wikidata-familyTree-decorate-by-generation .gen-2 {
		background-color: #301d00; /* yellow800 */
	}
	
	html.skin-theme-clientpref-night .wikidata-familyTree-decorate-by-generation .gen3,
	html.skin-theme-clientpref-night .wikidata-familyTree-decorate-by-generation .gen-3 {
		background-color: #18220f;
	}
	
	html.skin-theme-clientpref-night .wikidata-familyTree-decorate-by-generation .gen4,
	html.skin-theme-clientpref-night .wikidata-familyTree-decorate-by-generation .gen-4 {
		background-color: #00261e; /* green800 */
	}
}

@media screen and (prefers-color-scheme: dark) {
	html.skin-theme-clientpref-os .wikidata-familyTree-decorate-by-generation .gen0 {
		background-color: #421211; /* red800 */
	}
	
	html.skin-theme-clientpref-os .wikidata-familyTree-decorate-by-generation .gen1,
	html.skin-theme-clientpref-os .wikidata-familyTree-decorate-by-generation .gen-1 {
		background-color: #3a1908;
	}
	
	html.skin-theme-clientpref-os .wikidata-familyTree-decorate-by-generation .gen2,
	html.skin-theme-clientpref-os .wikidata-familyTree-decorate-by-generation .gen-2 {
		background-color: #301d00; /* yellow800 */
	}
	
	html.skin-theme-clientpref-os .wikidata-familyTree-decorate-by-generation .gen3,
	html.skin-theme-clientpref-os .wikidata-familyTree-decorate-by-generation .gen-3 {
		background-color: #18220f;
	}
	
	html.skin-theme-clientpref-os .wikidata-familyTree-decorate-by-generation .gen4,
	html.skin-theme-clientpref-os .wikidata-familyTree-decorate-by-generation .gen-4 {
		background-color: #00261e; /* green800 */
	}
}
/* [[Категория:Шаблоны:Подстраницы CSS]] */