Last modified by Aurelie Bertrand on 2021/05/20 10:45

Hide last authors
knogrix 4.1 1 {{ddtoc/}}
knogrix 1.1 2
3 ----
4
Aurelie Bertrand 16.1 5 = Context =
knogrix 1.1 6
Aurelie Bertrand 16.1 7 Since the 2019R2 version, DigDash allows you to set into variable properties of the default theme by using a css file.
knogrix 1.1 8
Aurelie Bertrand 16.1 9 You don’t need to override the default theme by using another CSS file anymore.
knogrix 1.1 10
Aurelie Bertrand 16.1 11 = Define CSS constants =
knogrix 1.1 12
Aurelie Bertrand 16.1 13 (% class="box" %)
14 (((
knogrix 1.1 15 :root
16 {
Aurelie Bertrand 16.1 17 ~-~-<constant name 1 CSS>: <constant value 1 CSS>
18 ~-~-<constant name 2 CSS>: <constant value 2 CSS>
19
20 ~-~-<constant name N CSS>: <constant value N CSS>
knogrix 1.1 21 }
Aurelie Bertrand 16.1 22 )))
knogrix 1.1 23
Aurelie Bertrand 16.1 24 * CSS constants must be defined in a single bloc :root
25 * Constant names must begin with ~-~- as naming convention
26 * Constants must be named clearly and must be understandable
knogrix 1.1 27
Aurelie Bertrand 16.1 28 = Example =
knogrix 1.1 29
Aurelie Bertrand 16.1 30 DigDash delivers CSS constants with default values that you can set depending on what you need.
knogrix 1.1 31
Aurelie Bertrand 16.1 32 (% class="box" %)
33 (((
34 (% style="line-height:1.38" %)
35 (% style="color:#3f3f3f; font-family:~"Open Sans~",sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; white-space:pre-wrap" %):root
knogrix 1.1 36
Aurelie Bertrand 16.1 37 (% style="line-height:1.38" %)
38 (% style="color:#3f3f3f; font-family:~"Open Sans~",sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; white-space:pre-wrap" %){
knogrix 1.1 39
Aurelie Bertrand 16.1 40 (% style="line-height:1.38" %)
41 (% style="color:#3f3f3f; font-family:~"Open Sans~",sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; white-space:pre-wrap" %)~-~-background-color-banner: #FFFFFF;
42
43 (% style="line-height:1.38" %)
44 (% style="color:#3f3f3f; font-family:~"Open Sans~",sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; white-space:pre-wrap" %)~-~-background-color-page: #FFFFFF;
45
46 (% style="line-height:1.38" %)
47 (% style="color:#3f3f3f; font-family:~"Open Sans~",sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; white-space:pre-wrap" %)~-~-background-color-portlet: transparent;
48
49 (% style="line-height:1.38" %)
50 (% style="color:#3f3f3f; font-family:~"Open Sans~",sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; white-space:pre-wrap" %)~-~-background-color-popup: #FFFFFF;
51
52 (% style="line-height:1.38" %)
53 (% style="color:#3f3f3f; font-family:~"Open Sans~",sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; white-space:pre-wrap" %)~-~-background-color-select: #11A0D9;
54
55 (% style="line-height:1.38" %)
56 (% style="color:#3f3f3f; font-family:~"Open Sans~",sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; white-space:pre-wrap" %)~-~-background-color-item: #F4F4F4;
57
58 (% style="line-height:1.38" %)
59 (% style="color:#3f3f3f; font-family:~"Open Sans~",sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; white-space:pre-wrap" %)~-~-background-color-label: #E2E2E2;
60
61 (% style="line-height:1.38" %)
62 (% style="color:#3f3f3f; font-family:~"Open Sans~",sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; white-space:pre-wrap" %)~-~-color: #515151;
63
64 (% style="line-height:1.38" %)
65 (% style="color:#3f3f3f; font-family:~"Open Sans~",sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; white-space:pre-wrap" %)~-~-color-select: #FFFFFF;
66
67 (% style="line-height:1.38" %)
68 (% style="color:#3f3f3f; font-family:~"Open Sans~",sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; white-space:pre-wrap" %)~-~-border-color: #CDD1D3;
69
70 (% style="line-height:1.38" %)
71 (% style="color:#3f3f3f; font-family:~"Open Sans~",sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; white-space:pre-wrap" %)~-~-logo-url: icons/digdash_2019/logo-dd-dark.svg;
72
73 (% style="line-height:1.38" %)
74 (% style="color:#3f3f3f; font-family:~"Open Sans~",sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; white-space:pre-wrap" %)~-~-font-family: 'Open Sans', arial;
75
76 (% style="line-height:1.38" %)
77 (% style="color:#3f3f3f; font-family:~"Open Sans~",sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; white-space:pre-wrap" %)}
78 )))
79
80 = Defining in the styles Dashboard editor =
81
knogrix 1.1 82 Dans l'éditeur de styles : <nom du thème de base>.css
83
Aurelie Bertrand 16.1 84 (% class="box" %)
85 (((
86 @import url("/<dashboard app>/file?method=loadTheme&theme=<basic theme name>.css&~-~-<constant name 1 CSS>=<constant value 1 CSS>&...&<constant name N CSS>=<constant value N CSS>");
87
knogrix 1.1 88 :root
89 {
Aurelie Bertrand 16.1 90 ~-~-<constant name 1 CSS>: <constant value 1 CSS>
91
92 ~-~-<constant name N CSS>: <constant value N CSS>
knogrix 1.1 93 }
Aurelie Bertrand 16.1 94 )))
knogrix 1.1 95
Aurelie Bertrand 16.1 96 The principle is to override CSS constant of the previous slide in the Dashboard style editor.
knogrix 1.1 97
Aurelie Bertrand 16.1 98 The first import line is mandatory to ensure compatibility with Internet Explorer browser.
knogrix 1.1 99
Aurelie Bertrand 16.1 100 We will set in the import URL parameters the name of CSS theme and the list of CSS constants defined in the :root section.
knogrix 1.1 101
Aurelie Bertrand 16.1 102 The URL should mention the dashboard application name (by default digdash_dashboard).
knogrix 1.1 103
Aurelie Bertrand 16.1 104 = Use in stylesheet =
baudard 9.1 105
Aurelie Bertrand 16.1 106 To use one of the constants previously defined, the constant need to be included in the function ##**var**## :
baudard 9.1 107
108 {{code language="css"}}
Aurelie Bertrand 16.1 109 .my-class{
baudard 14.1 110 background-color:var(--background-color-select)
baudard 9.1 111 }
112 {{/code}}
113
Aurelie Bertrand 16.1 114 = Example of stylesheet =
knogrix 1.1 115
Aurelie Bertrand 16.1 116 In the style editor : digdash_2019_template.css
knogrix 1.1 117
Aurelie Bertrand 16.1 118 (% class="box" %)
119 (((
120 @import url("/digdash_dashboard/file?method=loadTheme&theme=digdash_2019_template.css&~-~-background-color-select=#FF00FF");
knogrix 1.1 121
122 :root
123 {
Aurelie Bertrand 16.1 124 ~-~-background-color-select: #FF00FF;
baudard 9.1 125 }
Aurelie Bertrand 16.1 126 )))