1 2 3 4 5 6 7 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 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242
|
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Bluefish HTML Editor
all-css.bfinc $Revision: $
Copyright (C) 2008-2025 Olivier Sessink
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************************************
*********************************************************************************************
** **
** OPTIMISATION TIP **
** **
** every pattern and context in this file is loaded multiple times (within <style></style> **
** tags and in every style="" attribute). Therefore, re-use is important. Make sure every **
** context has id="" AND idref="" so the second time it is re-used. **
** elements can also be re-used, but the impact of that is much smaller (saves a few bytes **
** of memory) so this is far less important **
** **
*********************************************************************************************
*********************************************************************************************
-->
<bfinc>
<element id="e.css.lcomment" idref="e.css.lcomment" pattern="/*" starts_block="1" highlight="css-comment">
<context symbols="*/	 @ " highlight="css-comment">
<element pattern="*/" ends_block="1" blockstartelement="e.css.lcomment" highlight="css-comment" ends_context="1" />
</context>
</element>
&css-selectors;
<element idref="e.css.lbrace" id="e.css.lbrace" pattern="{" starts_block="1" highlight="css-brackets" >
<context symbols=" 	 {}.:"';*/&," id="c.css.rules" detect_indent="1">
<!-- *********************************************************************************
this is a context that ends two contexts on it's ending brace,
this is used for nesting css with the & operator and for keyframes
-->
<context id="c.css.nest.start" symbols=" 	 {}./*<>:+~[]()#," detect_indent="0">
&css-selectors;
<element idref="e.css.lcomment" />
<element id="e.css.nest.lbrace" pattern="{" starts_block="1" highlight="css-brackets">
<context symbols=" 	 {}./*<>:+~[]()#," id="c.css.nest.rules" detect_indent="1">
&css-rules;
<element pattern="&" highlight="css-operator">
<context idref="c.css.nest.start" />
</element>
<element idref="e.css.lcomment" />
<element id="e.css.nest.rbrace" pattern="}" ends_block="1" blockstartelement="e.css.nest.lbrace" highlight="css-brackets" ends_context="2" />
</context>
</element>
</context>
<!-- ************************************************************************************* -->
&css-rules;
<element idref="e.css.lcomment" />
<element id="e.css.rbrace" pattern="}" ends_block="1" blockstartelement="e.css.lbrace" highlight="css-brackets" ends_context="1" />
<!-- this starts a new nesting -->
<element pattern="&" highlight="css-operator">
<context idref="c.css.nest.start" />
</element>
</context>
</element>
<element pattern="@media" highlight="css-at-rule">
<reference>
@media not|only mediatype and (mediafeature and|or|not mediafeature) {
CSS-Code;
}
<b>Media types</b>
print Used for printers
screen Used for computer screens, tablets, smart-phones etc.
<b>Media Features</b>
any-hover Does any available input mechanism allow the user to hover over elements?
any-pointer Is any available input mechanism a pointing device, and if so, how accurate is it?
aspect-ratio The ratio between the width and the height of the viewport
color The number of bits per color component for the output device
color-gamut The approximate range of colors that are supported by the user agent and output device
color-index The number of colors the device can display
device-posture Detects the device's current posture, that is, whether the viewport is in a flat or folded state
display-mode The mode in which an application is being displayed: for example, fullscreen or picture-in-picture mode
dynamic-range Combination of brightness, contrast ratio, and color depth that are supported by the user agent and the output device
forced-colors Detect whether user agent restricts color palette
grid Whether the device is a grid or bitmap
height The viewport height
hover Does the primary input mechanism allow the user to hover over elements?
inverted-colors Is the browser or underlying OS inverting colors?
monochrome The number of bits per "color" on a monochrome (greyscale) device
orientation The orientation of the viewport (landscape or portrait mode)
overflow-block How does the output device handle content that overflows the viewport along the block axis
overflow-inline Can content that overflows the viewport along the inline axis be scrolled
pointer Is the primary input mechanism a pointing device, and if so, how accurate is it?
prefers-color-scheme Does the user prefer a light color scheme or a dark color scheme?
prefers-contrast Does the user prefer a high contrast display?
prefers-reduced-data Does the user prefer reduced data usage?
prefers-reduced-motion Does the user prefer reduced motion?
prefers-reduced-transparency Does the user prefer reduced transparency?
resolution The resolution of the output device, using dpi or dpcm
scan The scanning process of the output device
scripting Is scripting (e.g. JavaScript) available?
shape Is the viewport in a circular or a rectangular shape?
update How quickly can the output device modify the appearance of the content
video-dynamic-range Combination of brightness, contrast ratio, and color depth that are supported by the video plane of user agent and the output device
width The viewport width
</reference>
<context symbols=" 	 {}.;,()" id="c.css.media">
<group highlight="brackets">
<element pattern="(" starts_block="1" id="c.css.lroundbracket" idref="c.css.lroundbracket" />
<element pattern=")" ends_block="1" blockstartelement="c.css.lroundbracket" id="c.css.rroundbracket" idref="c.css.rroundbracket" />
</group>
<group highlight="css-operator">
<element pattern="not" />
<element pattern="only" />
<element pattern="and" />
</group>
<group highlight="css-html-media" >
<autocomplete enable="1" />
<element pattern="all" />
<element pattern="aural" />
<element pattern="braille" />
<element pattern="embossed" />
<element pattern="handheld" />
<element pattern="print" />
<element pattern="projection" />
<element pattern="screen" />
<element pattern="tty" />
<element pattern="tv" />
</group>
<element pattern="{" starts_block="1" highlight="css-brackets" id="e.css.media.lbrace">
<context idref="c.css.main" />
</element>
</context>
</element>
<element pattern="}" id="e.css.media.rbrace" ends_block="1" highlight="css-brackets" blockstartelement="e.css.media.lbrace" ends_context="2" /> <!-- condition_contextref="c.css.main" condition_mode="1" condition_relation="2" -->
<element pattern="@supports" highlight="css-at-rule">
<reference>The CSS @supports rule allows to test whether a browser supports a CSS feature, and to define fallback styles if the feature is not supported.
Example:
@supports (display: grid) {
.container {
display: grid;
}
}
</reference>
<autocomplete append=" () { 	 }" backup_cursor="7" />
<context symbols=" 	 {}.;,()" id="c.css.supports">
<group highlight="brackets">
<element pattern="(" starts_block="1" id="c.css.lroundbracket" idref="c.css.lroundbracket" />
<element pattern=")" ends_block="1" blockstartelement="c.css.lroundbracket" id="c.css.rroundbracket" idref="c.css.rroundbracket" />
</group>
<element idref="e.css.media.lbrace" />
</context>
</element>
<element pattern="@container" highlight="css-at-rule">
<reference>
@container containername (containerquery) {
css declarations
}
The following descriptors can be used within <b>containerquery</b>:
aspect-ratio
block-size
height
inline-size
orientation
width
</reference>
<context symbols=" 	 {}.;,()" id="c.css.container">
<group highlight="brackets">
<element pattern="(" starts_block="1" id="c.css.lroundbracket" idref="c.css.lroundbracket" />
<element pattern=")" ends_block="1" blockstartelement="c.css.lroundbracket" id="c.css.rroundbracket" idref="c.css.rroundbracket" />
</group>
<group highlight="css-html-media" >
<autocomplete enable="1" />
<element pattern="aspect-ratio" />
<element pattern="block-size" />
<element pattern="height" />
<element pattern="inline-size" />
<element pattern="orientation" />
<element pattern="width" />
</group>
<element idref="e.css.media.lbrace"/>
</context>
</element>
<element pattern="@keyframes" highlight="css-at-rule">
<reference>Controls the steps in an animation by defining styles for points along the animation sequence.
@keyframes name {
keyframes-selector {css-styles;}
keyframes-selector {css-styles;}
}
Example:
@keyframes mymove {
0% {top: 0px;}
25% {top: 200px;}
50% {top: 100px;}
75% {top: 200px;}
100% {top: 0px;}
}
</reference>
<autocomplete append=" { 	from { } 	to { } }" backup_cursor="24" />
<context symbols=" 	 {}.:"';*/">
<element pattern="{" starts_block="1" highlight="css-brackets" id="e.css.keyframes.lbrace">
<context symbols=" 	 {}.:"';*/" detect_indent="1">
<element pattern="from" highlight="css-html-tag" />
<element pattern="to" highlight="css-html-tag" />
<element idref="e.css.lbrace" />
<element idref="e.css.lcomment" />
<element pattern="}" ends_context="2" ends_block="1" highlight="css-brackets" blockstartelement="e.css.keyframes.lbrace" />
</context>
</element>
</context>
</element>
<group highlight="css-at-rule">
<element pattern="@import" />
<element pattern="@charset" />
<element pattern="@counter-style" /><!-- this at-rule can be further improved -->
<element pattern="@font-face" /><!-- this at-rule can be further improved -->
<element pattern="@font-palette-values" /><!-- this at-rule can be further improved -->
<element pattern="@layer" /><!-- this at-rule can be further improved -->
<element pattern="@namespace" /><!-- this at-rule can be further improved -->
<element pattern="@page" /><!-- this at-rule can be further improved -->
<element pattern="@property" /><!-- this at-rule can be further improved -->
<element pattern="@scope" /><!-- this at-rule can be further improved -->
</group>
</bfinc>
|