Skip to content

Commit

Permalink
Improve css scoping so that it is easier to make css customization vi…
Browse files Browse the repository at this point in the history
…a modules
  • Loading branch information
tuomas2 committed Aug 29, 2024
1 parent bbeaca1 commit 0c5bfb7
Show file tree
Hide file tree
Showing 39 changed files with 48 additions and 52 deletions.
6 changes: 1 addition & 5 deletions app/bibleview-js/src/components/BibleView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ setupEventBusListener("scroll_up", () => scrollUpDown(true));
useSharing({topElement, android});
const direction = computed(() => appSettings.rightToLeft ? "rtl" : "ltr");
</script>
<style lang="scss" scoped>
<style lang="scss">
@import "~@/common.scss";
$ring-size: 35px;
Expand Down Expand Up @@ -459,10 +459,6 @@ $borderDistance: 0;
background-color: rgba(0, 0, 0, 0.15);
}
</style>
<style lang="scss">
@import "~@/common.scss";
a {
color: blue;
Expand Down
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/BookmarkText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const highlightOffset = computed(() => {
useCommon();
</script>
<style scoped lang="scss">
<style lang="scss">
@import "~@/common.scss";
.bookmark-text {
Expand Down
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/MyBible/B.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ import {useCommon} from "@/composables";
useCommon();
</script>

<style lang="scss" scoped>
<style lang="scss">
@import "~@/common.scss";
</style>
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/MyBible/Br.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ import {useCommon} from "@/composables";
useCommon();
</script>

<style lang="scss" scoped>
<style lang="scss">
@import "~@/common.scss";
</style>
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/MyBible/H3.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ import {useCommon} from "@/composables";
useCommon()
</script>

<style lang="scss" scoped>
<style lang="scss">
@import "~@/common.scss";
</style>
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/MyBible/I.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {config} = useCommon();
const show = computed(() => config.showNonCanonical);
</script>

<style scoped>
<style>
.nonCanonical {
font-style: italic;
}
Expand Down
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/MyBible/Li.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ import {useCommon} from "@/composables";
useCommon();
</script>

<style lang="scss" scoped>
<style lang="scss">
@import "~@/common.scss";
</style>
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/MyBible/Ol.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ import {useCommon} from "@/composables";
useCommon();
</script>

<style lang="scss" scoped>
<style lang="scss">
@import "~@/common.scss";
</style>
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/MyBible/Pb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ import {useCommon} from "@/composables";
useCommon();
</script>

<style lang="scss" scoped>
<style lang="scss">
@import "~@/common.scss";
</style>
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/MyBible/S.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function openLink(event: MouseEvent) {
}
</script>

<style scoped>
<style>
.strongs {
font-size: 0.6em;
text-decoration: none;
Expand Down
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/MyBible/Strong.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ import {useCommon} from "@/composables";
useCommon();
</script>

<style lang="scss" scoped>
<style lang="scss">
@import "~@/common.scss";
</style>
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/OSIS/A.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ function openLink(event: MouseEvent, url: string) {
}
</script>

<style scoped>
<style>
</style>
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/OSIS/Abbr.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ defineProps<{expansion: string}>();
useCommon();
</script>

<style scoped>
<style>
.abbreviation {
}
Expand Down
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/OSIS/AndBibleLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ function openLink(event: MouseEvent, url: string) {
useCommon();
</script>

<style scoped>
<style>
</style>
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/OSIS/CatchWord.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {useCommon} from "@/composables";
useCommon();
</script>

<style scoped>
<style>
.catchWord {
font-weight: bold;
Expand Down
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/OSIS/Cell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ checkUnsupportedProps(props, "role")
useCommon();
</script>

<style scoped>
<style>
td {
padding: 5px;
Expand Down
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/OSIS/Div.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ const isPreVerse = computed(() => getIsPreVerse(props.type, props.subType));
const verseNum = computed(() => verseInfo!.verse);
</script>

<style lang="scss" scoped>
<style lang="scss">
@import "~@/common.scss";
</style>
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/OSIS/DivineName.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {useCommon} from "@/composables";
useCommon()
</script>

<style scoped>
<style>
.divineName {
font-variant: small-caps;
}
Expand Down
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/OSIS/Figure.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const {bookInitials} = inject(osisFragmentKey)!;
useCommon();
</script>

<style scoped>
<style>
.imageStyle {
max-width: 100%;
}
Expand Down
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/OSIS/Foreign.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ checkUnsupportedProps(props, "type");
useCommon();
</script>

<style scoped>
<style>
.foreign-style {
font-style: italic;
}
Expand Down
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/OSIS/Hi.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const hiStyle = computed(() => {
useCommon();
</script>

<style scoped>
<style>
.hi-italic, .rend-italic {
font-style: italic;
}
Expand Down
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/OSIS/Item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ import {useCommon} from "@/composables";
useCommon()
</script>

<style scoped>
<style>
</style>
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/OSIS/L.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ const isIndent = computed(() => type.value === "x-indent");
useCommon();
</script>

<style scoped>
<style>
</style>
4 changes: 2 additions & 2 deletions app/bibleview-js/src/components/OSIS/Lb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
-->

<template>
<span><br/><slot/></span>
<span class="lb"><br/><slot/></span>
</template>

<script setup lang="ts">
Expand All @@ -27,6 +27,6 @@ checkUnsupportedProps(props, "type");
useCommon();
</script>

<style scoped>
<style>
</style>
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/OSIS/Lg.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const show = computed(() => props.sID);
useCommon();
</script>

<style scoped>
<style>
.lg {
height: 0.3em;
display: block;
Expand Down
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/OSIS/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {useCommon} from "@/composables";
useCommon();
</script>

<style scoped>
<style>
.list-style {
}
Expand Down
4 changes: 2 additions & 2 deletions app/bibleview-js/src/components/OSIS/Milestone.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
-->

<template>
<span :class="{paragraphBreak}">{{ marker }}<slot/></span>
<span class="milestone" :class="{paragraphBreak}">{{ marker }}<slot/></span>
</template>

<script setup lang="ts">
Expand All @@ -40,7 +40,7 @@ const paragraphBreak = computed(() => props.type === "line");
useCommon();
</script>

<style scoped lang="scss">
<style lang="scss">
@import "~@/common.scss";
</style>
4 changes: 2 additions & 2 deletions app/bibleview-js/src/components/OSIS/NoOp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
-->

<template>
<span/>
<span class="no-op"/>
</template>

<script setup lang="ts">
Expand All @@ -25,6 +25,6 @@ import {useCommon} from "@/composables"
useCommon();
</script>

<style scoped>
<style>
</style>
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/OSIS/P.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ import {useCommon} from "@/composables";
useCommon();
</script>

<style scoped>
<style>
</style>
4 changes: 2 additions & 2 deletions app/bibleview-js/src/components/OSIS/Q.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- If not, see http://www.gnu.org/licenses/.
-->

<template><span :class="{redLetters: config.showRedLetters && isJesus}">{{ displayMarker }}<slot/></span></template>
<template><span class="q" :class="{redLetters: config.showRedLetters && isJesus}">{{ displayMarker }}<slot/></span></template>

<script setup lang="ts">
import {checkUnsupportedProps, useCommon} from "@/composables";
Expand All @@ -41,7 +41,7 @@ const displayMarker = computed(() => {
const {config} = useCommon();
</script>

<style scoped lang="scss">
<style lang="scss">
$redLetters: rgb(215, 13, 13);
.redLetters {
color: $redLetters !important;
Expand Down
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/OSIS/Reference.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function openLink(event: MouseEvent, url: string) {
</script>

<style lang="scss" scoped>
<style lang="scss">
@import "~@/common.scss";
.reference {
Expand Down
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/OSIS/Row.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ import {useCommon} from "@/composables";
useCommon()
</script>

<style scoped>
<style>
</style>
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/OSIS/Seg.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const isOtPassage = computed(() => props.type === "otPassage");
useCommon();
</script>

<style scoped>
<style>
.otPassage {
font-style: italic;
Expand Down
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/OSIS/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ checkUnsupportedProps(props, "border", ["1", "0"])
useCommon();
</script>

<style scoped>
<style>
</style>
2 changes: 1 addition & 1 deletion app/bibleview-js/src/components/OSIS/Title.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const show = computed(() =>
const isSubTitle = computed(() => props.type === "sub");
</script>

<style scoped lang="scss">
<style lang="scss">
.listStyle .titleStyle {
margin-inline-start: -1em;
}
Expand Down
4 changes: 2 additions & 2 deletions app/bibleview-js/src/components/OSIS/TransChange.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
-->

<template>
<span v-if="show" :class="{nonCanonical: config.makeNonCanonicalItalic && isNonCanonical}"><slot/></span>
<span v-if="show" class="trans-change" :class="{nonCanonical: config.makeNonCanonicalItalic && isNonCanonical}"><slot/></span>
</template>

<script setup lang="ts">
Expand All @@ -31,7 +31,7 @@ const isNonCanonical = computed(() => props.type?.toLowerCase() === "added");
const show = computed(() => (!isNonCanonical.value) || (isNonCanonical.value && config.showNonCanonical));
</script>

<style scoped>
<style>
.nonCanonical {
font-style: italic;
}
Expand Down
10 changes: 5 additions & 5 deletions app/bibleview-js/src/components/OSIS/W.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
<template>
<template v-if="showStrongsSeparately">
<template v-if="(showStrongs && lemma) && (config.showMorphology && morph)">
<slot/><span class="base skip-offset">&nbsp;<a :class="{isHighlighted}" class="strongs highlight-transition" :href="formatLink(lemma)" @click.prevent="goToLink($event, formatLink(lemma))">{{formatName(lemma)}}</a>/<a :class="{isHighlighted}" class="morph highlight-transition" :href="formatLink(morph)" @click.prevent="goToLink($event, formatLink(morph))">{{formatName(morph)}}</a></span>
<slot/><span class="w-base skip-offset">&nbsp;<a :class="{isHighlighted}" class="strongs highlight-transition" :href="formatLink(lemma)" @click.prevent="goToLink($event, formatLink(lemma))">{{formatName(lemma)}}</a>/<a :class="{isHighlighted}" class="morph highlight-transition" :href="formatLink(morph)" @click.prevent="goToLink($event, formatLink(morph))">{{formatName(morph)}}</a></span>
</template>
<template v-else-if="(showStrongs && lemma) && (!config.showMorphology || !morph)">
<slot/><span class="base skip-offset">&nbsp;<a class="strongs highlight-transition" :class="{isHighlighted}" :href="formatLink(lemma)" @click.prevent="goToLink($event, formatLink(lemma))">{{formatName(lemma)}}</a></span>
<slot/><span class="w-base skip-offset">&nbsp;<a class="strongs highlight-transition" :class="{isHighlighted}" :href="formatLink(lemma)" @click.prevent="goToLink($event, formatLink(lemma))">{{formatName(lemma)}}</a></span>
</template>
<template v-else-if="(!showStrongs || !lemma) && (config.showMorphology && morph)">
<slot/><span class="base skip-offset">&nbsp;<a class="morph highlight-transition" :href="formatLink(morph)" :class="{isHighlighted}" @click.prevent="goToLink($event, formatLink(morph))">{{formatName(morph)}}</a></span>
<slot/><span class="w-base skip-offset">&nbsp;<a class="morph highlight-transition" :href="formatLink(morph)" :class="{isHighlighted}" @click.prevent="goToLink($event, formatLink(morph))">{{formatName(morph)}}</a></span>
</template>
<template v-else><slot/></template>
</template>
Expand Down Expand Up @@ -111,7 +111,7 @@ const showStrongsSeparately = computed(() => !exportMode.value && config.strongs
</script>

<style scoped lang="scss">
<style lang="scss">
@import "~@/common.scss";
.link-style {
Expand All @@ -123,7 +123,7 @@ const showStrongsSeparately = computed(() => !exportMode.value && config.strongs
}
}
.base {
.w-base {
font-size: 0.6em;
text-decoration: none;
color: gray;
Expand Down
Loading

0 comments on commit 0c5bfb7

Please sign in to comment.