2if (!defined(
'ISLOADEDBYSTEELSHEET')) {
3 die(
'Must be call by steelsheet');
12 display:
inline-block;
15 font-weight: 700 !important;
19 vertical-align: baseline;
20 border-radius: .25rem;
21 transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
24 border-color: rgba(255,255,255,0);
25 box-sizing: border-box;
32.tabBar .arearef .statusref .badge-status, .tabBar .arearefnobottom .statusref .badge-status {
37@media only screen and (max-width: 767px)
39 .tabBar .arearef .statusref .badge-status, .tabBar .arearefnobottom .statusref .badge-status {
45.badge-pill, .tabs .badge {
48 border-radius: 0.25rem;
55 vertical-align: unset;
58a.badge:focus, a.badge:hover {
59 text-decoration: none;
62.liste_titre .badge:not(.nochangebackground) {
63 background-color: <?php print $badgeSecondary; ?>;
68 padding: 2px 7px 2px 7px;
69 background-color: #e4e4e4;
78 color: #fff !important;
79 background-color: <?php print $badgePrimary; ?>;
81a.badge-primary.focus, a.badge-primary:focus {
83 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgePrimary, 0.5); ?>;
85a.badge-primary:focus, a.badge-primary:hover {
86 color: #fff !important;
87 background-color: <?php print
colorDarker($badgePrimary, 10); ?>;
91.badge-secondary, .tabs .badge {
92 color: #fff !important;
93 background-color: <?php print $badgeSecondary; ?>;
95a.badge-secondary.focus, a.badge-secondary:focus {
97 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeSecondary, 0.5); ?>;
99a.badge-secondary:focus, a.badge-secondary:hover {
100 color: #fff !important;
101 background-color: <?php print
colorDarker($badgeSecondary, 10); ?>;
106 color: #fff !important;
107 background-color: <?php print $badgeSuccess; ?>;
109a.badge-success.focus, a.badge-success:focus {
111 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeSuccess, 0.5); ?>;
113a.badge-success:focus, a.badge-success:hover {
114 color: #fff !important;
115 background-color: <?php print
colorDarker($badgeSuccess, 10); ?>;
120 color: #fff !important;
121 background-color: <?php print $badgeDanger; ?>;
123a.badge-danger.focus, a.badge-danger:focus {
125 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeDanger, 0.5); ?>;
127a.badge-danger:focus, a.badge-danger:hover {
128 color: #fff !important;
129 background-color: <?php print
colorDarker($badgeDanger, 10); ?>;
134 color: #fff !important;
135 background-color: <?php print $badgeWarning; ?>;
137a.badge-warning.focus, a.badge-warning:focus {
139 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeWarning, 0.5); ?>;
141a.badge-warning:focus, a.badge-warning:hover {
142 color: #212529 !important;
143 background-color: <?php print
colorDarker($badgeWarning, 10); ?>;
147body[
class*=
"colorblind-"] .badge-warning {
148 background-color: <?php print $colorblind_deuteranopes_badgeWarning; ?>;
150body[
class*=
"colorblind-"] a.badge-warning.focus,body[
class^=
"colorblind-"] a.badge-warning:focus {
151 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($colorblind_deuteranopes_badgeWarning, 0.5); ?>;
153body[
class*=
"colorblind-"] a.badge-warning:focus, a.badge-warning:hover {
154 background-color: <?php print
colorDarker($colorblind_deuteranopes_badgeWarning, 10); ?>;
159 color: #fff !important;
160 background-color: <?php print $badgeInfo; ?>;
162a.badge-info.focus, a.badge-info:focus {
164 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeInfo, 0.5); ?>;
166a.badge-info:focus, a.badge-info:hover {
167 color: #fff !important;
168 background-color: <?php print
colorDarker($badgeInfo, 10); ?>;
173 color: #212529 !important;
174 background-color: <?php print $badgeLight; ?>;
176a.badge-light.focus, a.badge-light:focus {
178 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeLight, 0.5); ?>;
180a.badge-light:focus, a.badge-light:hover {
181 color: #212529 !important;
182 background-color: <?php print
colorDarker($badgeLight, 10); ?>;
187 color: #fff !important;
188 background-color: <?php print $badgeDark; ?>;
190a.badge-dark.focus, a.badge-dark:focus {
192 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeDark, 0.5); ?>;
194a.badge-dark:focus, a.badge-dark:hover {
195 color: #fff !important;
196 background-color: <?php print
colorDarker($badgeDark, 10); ?>;
200@media only screen and (max-width: 570px)
202 span.badge.badge-status {
205 text-overflow: ellipsis;
212for ($i = 0; $i <= 10; $i++) {
214 _createStatusBadgeCss($i,
'',
"STATUS".$i);
217 _createStatusBadgeCss($i,
'colorblind_deuteranopes_',
"COLORBLIND STATUS".$i,
'body[class*="colorblind-"] ');
220_createStatusBadgeCss(
'1b',
'',
"STATUS1b");
221_createStatusBadgeCss(
'4b',
'',
"STATUS4b");
232function _createStatusBadgeCss($statusName, $statusVarNamePrefix =
'', $commentLabel =
'', $cssPrefix =
'')
235 global ${$statusVarNamePrefix.
'badgeStatus'.$statusName}, ${$statusVarNamePrefix.
'badgeStatus_textColor'.$statusName};
237 if (!empty(${$statusVarNamePrefix.
'badgeStatus'.$statusName})) {
238 print
"\n/* ".strtoupper($commentLabel).
" */\n";
240 $thisBadgeBackgroundColor = $thisBadgeBorderColor = ${$statusVarNamePrefix.
'badgeStatus'.$statusName};
243 $TBadgeBorderOnly = array(
'0',
'1b',
'3',
'4b',
'5',
'7',
'10');
244 $thisBadgeTextColor =
colorIsLight(${$statusVarNamePrefix.
'badgeStatus'.$statusName}) ?
'#212529' :
'#ffffff';
246 if (!empty(${$statusVarNamePrefix.
'badgeStatus_textColor'.$statusName})) {
247 $thisBadgeTextColor = ${$statusVarNamePrefix.
'badgeStatus_textColor'.$statusName};
250 if (in_array((
string) $statusName, $TBadgeBorderOnly)) {
251 $thisBadgeTextColor =
'#212529';
252 $thisBadgeBackgroundColor =
"#fff";
255 if (in_array((
string) $statusName, array(
'0',
'5',
'9'))) {
256 $thisBadgeTextColor =
'#999999';
258 if (in_array((
string) $statusName, array(
'6'))) {
259 $thisBadgeTextColor =
'#777777';
262 print $cssPrefix.
".badge-status".$statusName.
" {\n";
263 print
" color: ".$thisBadgeTextColor.
" !important;\n";
264 if (in_array((
string) $statusName, $TBadgeBorderOnly)) {
265 print
" border-color: ".$thisBadgeBorderColor.
" !important;\n";
267 print
" background-color: ".$thisBadgeBackgroundColor.
" !important;\n";
270 print $cssPrefix.
".font-status".$statusName.
" {\n";
271 print
" color: ".$thisBadgeBackgroundColor.
" !important;\n";
274 print $cssPrefix.
".badge-status".$statusName.
".focus, ".$cssPrefix.
".badge-status".$statusName.
":focus {\n";
275 print
" outline: 0;\n";
276 print
" box-shadow: 0 0 0 0.2rem ".colorHexToRgb($thisBadgeBackgroundColor, 0.5).
" !important;\n";
279 print $cssPrefix.
".badge-status".$statusName.
":focus, ".$cssPrefix.
".badge-status".$statusName.
":hover {\n";
280 print
" color: ".$thisBadgeTextColor.
" !important;\n";
282 if (in_array((
string) $statusName, $TBadgeBorderOnly)) {
283 print
" border-color: ".colorDarker($thisBadgeBorderColor, 10).
" !important;\n";
colorHexToRgb($hex, $alpha=false, $returnArray=false)
colorDarker($hex, $percent)
colorIsLight($stringcolor)
Return true if the color is light.