Grammalecte  Check-in [ae3c05dd2b]

Overview
Comment:[fx] WebExt: try to protect elements from CSS inheritance (lexicographer)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fx
Files: files | file ages | folders
SHA3-256: ae3c05dd2be2261165fbd4eb75ce43d196dd8e45b103c6d2dae8d38606fee654
User & Date: olr on 2017-09-02 18:52:47
Other Links: manifest | tags
Context
2017-09-02
19:31
[fx] WebExt: use transparency for the wrapper check-in: 181dd4ee47 user: olr tags: trunk, fx
18:52
[fx] WebExt: try to protect elements from CSS inheritance (lexicographer) check-in: ae3c05dd2b user: olr tags: trunk, fx
18:09
[fx] WebExt: try to protect elements from CSS inheritance (text formatter) check-in: 28cb4e344d user: olr tags: trunk, fx
Changes

Modified gc_lang/fr/webext/content_scripts/panel_lxg.css from [d3cb04a117] to [58f7a11f55].

8
9
10
11
12
13
14

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

36
37
38
39

40
41
42
43
44

45
46











47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83

.grammalecte_lxg_list_of_tokens {
    margin: 5px 0 10px 0;
    padding: 10px;
    background-color: hsla(0, 0%, 96%, 1);
    border-radius: 2px;
}

.grammalecte_lxg_list_of_tokens .num {
    float: right;
    margin: -12px 0 5px 10px;
    padding: 5px 10px;
    font-weight: bold;
    border-radius: 0 0 4px 4px;
    background-color: hsl(0, 50%, 50%);
    color: hsl(0, 10%, 96%);
}
.grammalecte_token  {
    padding: 4px 0;
}
.grammalecte_token .separator {
    margin: 20px 0;
    padding: 5px 5px;
    background-color: hsla(0, 0%, 75%, 1);
    color: hsla(0, 0%, 96%, 1);
    border-radius: 5px;
    text-align: center;
    font-size: 20px;
}

.grammalecte_token ul {
    margin: 0 0 5px 5px;
}
.grammalecte_token b {

    background-color: hsla(150, 10%, 50%, 1);
    color: hsla(0, 0%, 96%, 1);
    padding: 2px 5px;
    border-radius: 2px;
    text-decoration: none;

}
.grammalecte_token b.WORD {











    background-color: hsla(150, 50%, 50%, 1);
}
.grammalecte_token b.ELPFX {
    background-color: hsla(150, 30%, 50%, 1);
}
.grammalecte_token b.UNKNOWN {
    background-color: hsla(0, 50%, 50%, 1);
}
.grammalecte_token b.NUM {
    background-color: hsla(180, 50%, 50%, 1);
}
.grammalecte_token b.COMPLEX {
    background-color: hsla(60, 50%, 50%, 1);
}
.grammalecte_token b.SEPARATOR {
    background-color: hsla(210, 50%, 50%, 1);
}
.grammalecte_token b.LINK {
    background-color: hsla(270, 50%, 50%, 1);
}
.grammalecte_token s {
    color: hsla(0, 0%, 60%, 1);
    text-decoration: none;
}
.grammalecte_token .textline {
    text-decoration: bold;
}

.grammalecte_token p.message {
    margin-top: 20px;
    padding: 10px 10px;
    background-color: hsla(240, 10%, 50%, 1);
    font-size: 18px;
    color: hsla(240, 0%, 96%, 1);
    border-radius: 3px;
    text-align: center;
}







>
|








<
<
|
|








>
|
|

|
>
|
|



>

|
>
>
>
>
>
>
>
>
>
>
>


|


|


|


|


|


|


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24


25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79


















.grammalecte_lxg_list_of_tokens {
    margin: 5px 0 10px 0;
    padding: 10px;
    background-color: hsla(0, 0%, 96%, 1);
    border-radius: 2px;
}

.grammalecte_lxg_list_num {
    float: right;
    margin: -12px 0 5px 10px;
    padding: 5px 10px;
    font-weight: bold;
    border-radius: 0 0 4px 4px;
    background-color: hsl(0, 50%, 50%);
    color: hsl(0, 10%, 96%);
}



.grammalecte_lxg_separator {
    margin: 20px 0;
    padding: 5px 5px;
    background-color: hsla(0, 0%, 75%, 1);
    color: hsla(0, 0%, 96%, 1);
    border-radius: 5px;
    text-align: center;
    font-size: 20px;
}

.grammalecte_lxg_token_block  {
    margin: 4px 0;
}
.grammalecte_lxg_token {
    display: inline-block;
    background-color: hsl(150, 0%, 50%);
    color: hsl(0, 0%, 96%);
    padding: 2px 5px;
    border-radius: 2px;
    text-decoration: none;
    font-weight: bold;
}
.grammalecte_lxg_token_colon {
    display: inline-block;
    padding: 2px 5px;
    color: hsl(0, 0%, 50%);
}
.grammalecte_lxg_morph_list {
    padding: 2px 0 10px 20px;
}
.grammalecte_lxg_morph_elem {
    color: hsl(0, 0%, 0%);
}
.grammalecte_lxg_token_WORD {
    background-color: hsla(150, 50%, 50%, 1);
}
.grammalecte_lxg_token_ELPFX {
    background-color: hsla(150, 30%, 50%, 1);
}
.grammalecte_lxg_token_UNKNOWN {
    background-color: hsla(0, 50%, 50%, 1);
}
.grammalecte_lxg_token_NUM {
    background-color: hsla(180, 50%, 50%, 1);
}
.grammalecte_lxg_token_COMPLEX {
    background-color: hsla(60, 50%, 50%, 1);
}
.grammalecte_lxg_token_SEPARATOR {
    background-color: hsla(210, 50%, 50%, 1);
}
.grammalecte_lxg_token_LINK {
    background-color: hsla(270, 50%, 50%, 1);
}

















Modified gc_lang/fr/webext/content_scripts/panel_lxg.js from [cdbdd25ffd] to [dcf9b1545d].

29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
    }

    addListOfTokens (lTokens) {
        try {
            if (lTokens) {
                this._nCount += 1;
                let xNodeDiv = createNode("div", {className: "grammalecte_lxg_list_of_tokens"});
                xNodeDiv.appendChild(createNode("div", {className: "num", textContent: this._nCount}));
                for (let oToken of lTokens) {
                    xNodeDiv.appendChild(this._createTokenNode(oToken));
                }
                this._xContentNode.appendChild(xNodeDiv);
            }
        }
        catch (e) {
            showError(e);
        }
    }

    _createTokenNode (oToken) {
        let xTokenNode = createNode("div", {className: "grammalecte_token"});
        xTokenNode.appendChild(createNode("b", {className: oToken.sType, textContent: oToken.sValue}));
        xTokenNode.appendChild(createNode("s", {textContent: " : "}));
        if (oToken.aLabel.length === 1) {
            xTokenNode.appendChild(document.createTextNode(oToken.aLabel[0]));
        } else {
            let xTokenList = document.createElement("ul");
            for (let sLabel of oToken.aLabel) {
                xTokenList.appendChild(createNode("li", {textContent: sLabel}));
            }
            xTokenNode.appendChild(xTokenList);
        }
        return xTokenNode;
    }

    setHidden (sClass, bHidden) {







|












|
|
|



|

|







29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
    }

    addListOfTokens (lTokens) {
        try {
            if (lTokens) {
                this._nCount += 1;
                let xNodeDiv = createNode("div", {className: "grammalecte_lxg_list_of_tokens"});
                xNodeDiv.appendChild(createNode("div", {className: "grammalecte_lxg_list_num", textContent: this._nCount}));
                for (let oToken of lTokens) {
                    xNodeDiv.appendChild(this._createTokenNode(oToken));
                }
                this._xContentNode.appendChild(xNodeDiv);
            }
        }
        catch (e) {
            showError(e);
        }
    }

    _createTokenNode (oToken) {
        let xTokenNode = createNode("div", {className: "grammalecte_lxg_token_block"});
        xTokenNode.appendChild(createNode("div", {className: "grammalecte_lxg_token grammalecte_lxg_token_" + oToken.sType, textContent: oToken.sValue}));
        xTokenNode.appendChild(createNode("div", {className: "grammalecte_lxg_token_colon", textContent: ":"}));
        if (oToken.aLabel.length === 1) {
            xTokenNode.appendChild(document.createTextNode(oToken.aLabel[0]));
        } else {
            let xTokenList = createNode("div", {className: "grammalecte_lxg_morph_list"});
            for (let sLabel of oToken.aLabel) {
                xTokenList.appendChild(createNode("div", {className: "grammalecte_lxg_morph_elem", textContent: "• " + sLabel}));
            }
            xTokenNode.appendChild(xTokenList);
        }
        return xTokenNode;
    }

    setHidden (sClass, bHidden) {