aboutsummaryrefslogtreecommitdiff
path: root/ext/data/pronunciation-style.json
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-07-17 22:39:25 -0400
committerGitHub <noreply@github.com>2021-07-17 22:39:25 -0400
commite1230c7934084e1748e70e88b98f67e05cf0cf11 (patch)
treee551d98827ee1977538d6b5fd402050459718361 /ext/data/pronunciation-style.json
parentfafa746a632b1907d9cca262f689d7bec4e0f940 (diff)
CSS JSON styles generalization (#1838)
* Rename files * Generalize custom CSS generation and testing * Add CSS JSON file for display pronunciation
Diffstat (limited to 'ext/data/pronunciation-style.json')
-rw-r--r--ext/data/pronunciation-style.json166
1 files changed, 166 insertions, 0 deletions
diff --git a/ext/data/pronunciation-style.json b/ext/data/pronunciation-style.json
new file mode 100644
index 00000000..d8e54c80
--- /dev/null
+++ b/ext/data/pronunciation-style.json
@@ -0,0 +1,166 @@
+[
+ {
+ "selectors": [".pronunciation-downstep-notation"],
+ "styles": [
+ ["display", "inline"]
+ ]
+ },
+ {
+ "selectors": [".pronunciation-text"],
+ "styles": [
+ ["display", "inline"]
+ ]
+ },
+ {
+ "selectors": [".pronunciation-mora"],
+ "styles": [
+ ["display", "inline-block"],
+ ["position", "relative"]
+ ]
+ },
+ {
+ "selectors": [".pronunciation-mora-line"],
+ "styles": [
+ ["border-color", "currentColor"]
+ ]
+ },
+ {
+ "selectors": [".pronunciation-mora[data-pitch=high]>.pronunciation-mora-line"],
+ "styles": [
+ ["display", "block"],
+ ["user-select", "none"],
+ ["pointer-events", "none"],
+ ["position", "absolute"],
+ ["top", "0.1em"],
+ ["left", "0"],
+ ["right", "0"],
+ ["height", "0"],
+ ["border-top-width", "0.1em"],
+ ["border-top-style", "solid"]
+ ]
+ },
+ {
+ "selectors": [".pronunciation-mora[data-pitch=high][data-pitch-next=low]>.pronunciation-mora-line"],
+ "styles": [
+ ["right", "-0.1em"],
+ ["height", "0.4em"],
+ ["border-right-width", "0.1em"],
+ ["border-right-style", "solid"]
+ ]
+ },
+ {
+ "selectors": [".pronunciation-mora[data-pitch=high][data-pitch-next=low]"],
+ "styles": [
+ ["padding-right", "0.1em"],
+ ["margin-right", "0.1em"]
+ ]
+ },
+ {
+ "selectors": [".pronunciation-devoice-indicator"],
+ "styles": [
+ ["display", "block"],
+ ["position", "absolute"],
+ ["left", "50%"],
+ ["top", "50%"],
+ ["width", "1.125em"],
+ ["height", "1.125em"],
+ ["border-radius", "50%"],
+ ["box-sizing", "border-box"],
+ ["z-index", "1"],
+ ["transform", "translate(-50%, -50%)"],
+ ["border", "1.5px dotted #c83c28"]
+ ]
+ },
+ {
+ "selectors": [".pronunciation-nasal-indicator"],
+ "styles": [
+ ["display", "block"],
+ ["position", "absolute"],
+ ["right", "-0.125em"],
+ ["top", "0.125em"],
+ ["width", "0.375em"],
+ ["height", "0.375em"],
+ ["border-radius", "50%"],
+ ["box-sizing", "border-box"],
+ ["z-index", "1"],
+ ["border", "1.5px solid #c83c28"]
+ ]
+ },
+ {
+ "selectors": [".pronunciation-nasal-diacritic"],
+ "styles": [
+ ["position", "absolute"],
+ ["width", "0"],
+ ["height", "0"],
+ ["opacity", "0"]
+ ]
+ },
+ {
+ "selectors": [".pronunciation-character"],
+ "styles": [
+ ["display", "inline"]
+ ]
+ },
+ {
+ "selectors": [".pronunciation-character-group"],
+ "styles": [
+ ["display", "inline-block"],
+ ["position", "relative"]
+ ]
+ },
+ {
+ "selectors": [".pronunciation-graph"],
+ "styles": [
+ ["display", "inline-block"],
+ ["vertical-align", "middle"],
+ ["height", "1.5em"]
+ ]
+ },
+ {
+ "selectors": [
+ ".pronunciation-graph-line",
+ ".pronunciation-graph-line-tail"
+ ],
+ "styles": [
+ ["fill", "none"],
+ ["stroke-width", "5"],
+ ["stroke", "currentColor"]
+ ]
+ },
+ {
+ "selectors": [".pronunciation-graph-line-tail"],
+ "styles": [
+ ["stroke-dasharray", "5 5"]
+ ]
+ },
+ {
+ "selectors": [".pronunciation-graph-dot"],
+ "styles": [
+ ["stroke-width", "5"],
+ ["fill", "currentColor"],
+ ["stroke", "currentColor"]
+ ]
+ },
+ {
+ "selectors": [".pronunciation-graph-dot-downstep1"],
+ "styles": [
+ ["fill", "none"],
+ ["stroke-width", "5"],
+ ["stroke", "currentColor"]
+ ]
+ },
+ {
+ "selectors": [".pronunciation-graph-dot-downstep2"],
+ "styles": [
+ ["fill", "currentColor"]
+ ]
+ },
+ {
+ "selectors": [".pronunciation-graph-triangle"],
+ "styles": [
+ ["fill", "none"],
+ ["stroke-width", "5"],
+ ["stroke", "currentColor"]
+ ]
+ }
+] \ No newline at end of file