file
stringlengths
16
94
text
stringlengths
32
24.4k
vector
list
javascript/reference/global_objects/iterator/includes/index.md
JavaScript - Global Objects - Iterator - includes - Syntax - Return value: A boolean value which is `true` if the value `searchElement` is found within the iterator (or the part of the iterator starting at `fromIndex`, if specified).
[ -1.2322075366973877, 0.14480005204677582, -0.5401763916015625, 0.49665647745132446, -0.32785093784332275, -1.3768614530563354, 0.18348050117492676, 0.3940124213695526, -0.8886440396308899, -0.27010542154312134, -0.3228553235530853, 0.44377273321151733, 0.06200069189071655, 0.39112323522567...
javascript/reference/global_objects/iterator/includes/index.md
JavaScript - Global Objects - Iterator - includes - Syntax - Exceptions: - `TypeError`: Thrown if `fromIndex` is not one of: an integer, `Infinity`, `-Infinity`, or `undefined`. - `RangeError`: Thrown if `fromIndex` is negative.
[ -1.535875916481018, -0.20245052874088287, -0.6254244446754456, 0.8043431043624878, -0.13853931427001953, -1.5614597797393799, -0.3414866626262665, 0.6702979803085327, -0.7341107726097107, -0.17879247665405273, -0.6372607946395874, -0.27151405811309814, -0.6211686134338379, -0.4349655508995...
javascript/reference/global_objects/iterator/includes/index.md
JavaScript - Global Objects - Iterator - includes - Description: The `includes()` method compares `searchElement` to elements of the array using the SameValueZero algorithm. This algorithm works like strict equality `===` (where `-0` and `+0` are considered equal), with the exception that `NaN` is considered equal to ...
[ -0.7283545136451721, 0.03397132083773613, -0.40622541308403015, 1.0768167972564697, 0.5241729021072388, -1.0111573934555054, 1.2940162420272827, 0.10472269356250763, -1.2236090898513794, 0.8318865299224854, -0.7833717465400696, -0.1368725299835205, -0.03263062238693237, 0.07391674816608429...
javascript/reference/global_objects/iterator/includes/index.md
JavaScript - Global Objects - Iterator - includes - Examples - Using includes(): Example: function* fibonacci() { let current = 1; let next = 1; while (true) { yield current; [current, next] = [next, current + next]; } } console.log(fibonacci().includes(8)); // true console.log(fibonacci().take(10).i...
[ -1.5182857513427734, 0.2870789170265198, -0.941888689994812, 0.5666211843490601, -0.07428048551082611, -1.5321004390716553, 0.4022549092769623, 0.5867244005203247, -0.5549380779266357, 0.2025805413722992, 0.23490464687347412, 0.8800181150436401, 0.43361520767211914, 0.33018553256988525, ...
javascript/reference/global_objects/iterator/includes/index.md
JavaScript - Global Objects - Iterator - includes - Examples - Using fromIndex: `fromIndex` specifies the number of elements to be skipped from the beginning. It is equivalent to calling `drop(fromIndex).includes(searchElement)`. Example: function* fibonacci() { let current = 1; let next = 1; while (true) { ...
[ -1.3700485229492188, -0.8646469116210938, -1.232740044593811, 0.5172876119613647, -0.006945692002773285, -1.9320971965789795, 0.8967095017433167, 0.3325447738170624, -0.9697132110595703, -0.003771420568227768, -0.9989722967147827, 0.2514733374118805, -0.2294158637523651, 0.4775370359420776...
javascript/reference/global_objects/iterator/some/index.md
JavaScript - Global Objects - Iterator - some: The `some()` method of `Iterator` instances is similar to `Array.prototype.some()`: it returns `true` if it finds an element that satisfies the provided testing function. Otherwise, if the iterator is exhausted without finding such an element, it returns `false`.
[ -0.7674335241317749, -0.4135505259037018, -0.6645838022232056, 0.16511498391628265, -0.22209659218788147, -1.4982514381408691, 0.690025269985199, 0.9442609548568726, -1.2166062593460083, 0.5522212982177734, -0.391602486371994, -0.13621318340301514, 0.021976690739393234, 0.435051292181015, ...
javascript/reference/global_objects/iterator/some/index.md
JavaScript - Global Objects - Iterator - some - Syntax: Example: some(callbackFn)
[ -0.7056200504302979, 0.6726595759391785, -1.175404667854309, -0.34259411692619324, -0.7275654673576355, -1.5652366876602173, 0.5623347163200378, 1.0127047300338745, -1.1493808031082153, 0.45965278148651123, -0.547912061214447, 0.6837480664253235, -1.166610836982727, 0.9519448280334473, 0...
javascript/reference/global_objects/iterator/some/index.md
JavaScript - Global Objects - Iterator - some - Syntax - Parameters: - `callbackFn`: A function to execute for each element produced by the iterator. It should return a truthy value to indicate the element passes the test, and a falsy value otherwise. The function is called with the following arguments: - `element`:...
[ -0.6526778936386108, -0.16899020969867706, -0.9002637267112732, -0.0872202143073082, -0.24033528566360474, -1.4606448411941528, 0.33869680762290955, -0.09941694885492325, -1.0471422672271729, 0.5154567360877991, -1.1152552366256714, 0.5311518907546997, -0.9191086292266846, 1.80810177326202...
javascript/reference/global_objects/iterator/some/index.md
JavaScript - Global Objects - Iterator - some - Syntax - Return value: `true` if the callback function returns a `truthy` value for at least one element. Otherwise, `false`.
[ -1.1222931146621704, 0.34574344754219055, -0.9106913805007935, 0.31062841415405273, -0.6664868593215942, -1.7590758800506592, 0.7522106170654297, 0.44542694091796875, -1.3426096439361572, 0.568593442440033, -0.8091959953308105, 0.23406299948692322, 0.7568365931510925, 0.7130863070487976, ...
javascript/reference/global_objects/iterator/some/index.md
JavaScript - Global Objects - Iterator - some - Description: `some()` iterates the iterator and invokes the `callbackFn` function once for each element. It returns `true` immediately if the callback function returns a truthy value. Otherwise, it iterates until the end of the iterator and returns `false`. If `some()` r...
[ -0.8313692212104797, 0.21981298923492432, -1.1488432884216309, 0.141061931848526, -0.34324535727500916, -1.494868278503418, 0.6992985010147095, 0.017572518438100815, -1.1698129177093506, 0.9799267053604126, -0.2456275373697281, 0.6771822571754456, -0.5734351277351379, 0.5750458240509033, ...
javascript/reference/global_objects/iterator/some/index.md
JavaScript - Global Objects - Iterator - some - Examples - Using some(): Example: function* fibonacci() { let current = 1; let next = 1; while (true) { yield current; [current, next] = [next, current + next]; } } const isEven = (x) => x % 2 === 0; console.log(fibonacci().some(isEven)); // true const...
[ -1.2609453201293945, 0.0704728439450264, -0.9812678694725037, 0.030717916786670685, -0.036747321486473083, -1.6547871828079224, 0.4785507917404175, 1.0419187545776367, -0.6749207377433777, 0.4153931736946106, -0.06753461062908173, 0.889961302280426, -0.026272665709257126, 0.277293711900711...
css/reference/selectors/_colon_is/index.md
CSS - Selectors - :is: The `:is()` CSS pseudo-class function takes a selector list as its argument, and selects any element that can be selected by one of the selectors in that list. This is useful for writing large selectors in a more compact form. Note: Originally named `:matches()` (and `:any()`), this selector wa...
[ 0.49448469281196594, -0.8309621214866638, -1.6399741172790527, 0.46687597036361694, 0.2844862639904022, -1.4088164567947388, 0.014988884329795837, 1.515293836593628, -0.6291431188583374, 0.7116023302078247, 0.9741957187652588, -0.159504234790802, 1.0304644107818604, -0.0664803683757782, ...
css/reference/selectors/_colon_is/index.md
CSS - Selectors - :is - Syntax: Example: :is(<forgiving-selector-list>) { /* ... */ }
[ -0.31565967202186584, -0.8900921940803528, -0.9305359721183777, 1.0421406030654907, -0.8031305074691772, -1.8154906034469604, 1.0774515867233276, 1.6583365201950073, 0.7316381335258484, 0.15633976459503174, 0.16217756271362305, -0.2677752673625946, 0.27742063999176025, -0.19895388185977936...
css/reference/selectors/_colon_is/index.md
CSS - Selectors - :is - Syntax - Parameters: The `:is()` pseudo-class requires a selector list, a comma-separated list of one or more selectors as its argument. The list must not contain a pseudo-element, but any other simple, compound, and complex selectors are allowed.
[ -0.374352365732193, -0.8142198920249939, -1.6539839506149292, 1.0632206201553345, 0.017047397792339325, -1.3246132135391235, 0.5209565162658691, 0.5164657831192017, -0.18851107358932495, 0.357791930437088, -0.26446160674095154, -0.4675653874874115, 0.12468738853931427, -0.666781485080719, ...
css/reference/selectors/_colon_is/index.md
CSS - Selectors - :is - Syntax - Difference between :is() and :where(): The difference between the two is that `:is()` counts towards the specificity of the overall selector (it takes the specificity of its most specific argument), whereas `:where()` has a specificity value of 0. This is demonstrated by the example on...
[ -0.6371057629585266, -0.798396646976471, -1.534188985824585, 1.2364895343780518, -0.21413752436637878, -2.160658121109009, -0.08519767224788666, 0.41603028774261475, 0.09963291883468628, 0.24705103039741516, -0.055373549461364746, -0.619225263595581, -0.0010653231292963028, 0.2190841734409...
css/reference/selectors/_colon_is/index.md
CSS - Selectors - :is - Syntax - Forgiving Selector Parsing: The specification defines `:is()` and `:where()` as accepting a forgiving selector list. In CSS when using a selector list, if any of the selectors are invalid then the whole list is deemed invalid. When using `:is()` or `:where()` instead of the whole list...
[ -0.1525193750858307, -0.5887210965156555, -1.1044963598251343, 0.22443309426307678, 0.4709814786911011, -2.0488317012786865, 0.3815324306488037, 0.471578985452652, 0.07956863939762115, 0.38497769832611084, 0.49911361932754517, -1.0018514394760132, 0.5404216647148132, 0.73558109998703, -1...
css/reference/selectors/_colon_is/index.md
CSS - Selectors - :is - Examples - Simplifying list selectors: The `:is()` pseudo-class can greatly simplify your CSS selectors. For example, take the following CSS: Example: /* 3-deep (or more) unordered lists use a square */ ol ol ul, ol ul ul, ol menu ul, ol ol menu, ol ul menu, ol menu menu, ul ol ul, ul ul ul, ...
[ -0.16569006443023682, -0.16389816999435425, -1.7021909952163696, -0.3536771535873413, 0.5559375882148743, -1.273551344871521, 0.3185573220252991, 1.2036861181259155, -0.2900583744049072, -0.14723514020442963, 0.42523452639579773, -0.5940999388694763, 0.60993492603302, 0.2442484200000763, ...
css/reference/selectors/_colon_is/index.md
CSS - Selectors - :is - Examples - Simplifying section selectors: The `:is()` pseudo-class is particularly useful when dealing with HTML sections and headings. Since `section`, `article`, `aside`, and `nav` are commonly nested together, without `:is()`, styling them to match one another can be tricky. For example, wi...
[ -0.4932045638561249, -0.2951015830039978, -1.0817471742630005, 0.8353224396705627, 0.5759821534156799, -1.3921449184417725, -0.19646219909191132, 1.1809614896774292, -0.5001721382141113, 0.4690842628479004, -0.04690338671207428, -0.19095918536186218, 0.05541300028562546, 0.5382254123687744...
css/reference/selectors/_colon_is/index.md
CSS - Selectors - :is - Examples - :is() does not select pseudo-elements: The `:is()` pseudo-class does not match pseudo-elements. So rather than this: Example: some-element:is(::before, ::after) { display: block; } or this: Example: :is(some-element::before, some-element::after) { display: block; } instead ...
[ 0.6655260920524597, -0.4282657504081726, -1.4372446537017822, 0.7724001407623291, -0.5401374697685242, -1.4429903030395508, 0.6520662903785706, 0.49473679065704346, -0.546360969543457, 0.3046148419380188, 0.3243156671524048, -0.7086614966392517, -0.04086781293153763, -0.46394363045692444, ...
css/reference/at-rules/@supports/index.md
CSS - At-rules - @supports: The `@supports` CSS at-rule lets you specify CSS declarations that depend on a browser's support for CSS features. Using this at-rule is commonly called a feature query. The rule must be placed at the top level of your code or nested inside any other conditional group at-rule. In JavaScrip...
[ 0.16034647822380066, 0.01563013345003128, -0.6953844428062439, -0.19994138181209564, 0.6062058210372925, -1.8753114938735962, 0.4993433356285095, 1.5347015857696533, -0.4439605474472046, 0.38633546233177185, -0.5452205538749695, 0.20406463742256165, 0.5347641706466675, 0.2630734443664551, ...
css/reference/at-rules/@supports/index.md
CSS - At-rules - @supports - Syntax: Example: @supports (<supports-condition>) { /* If the condition is true, use the CSS in this block. */ } @supports (<supports-condition>) and (<supports-condition>) { /* If both conditions are true, use the CSS in this block. */ } The `@supports` at-rule consists of a block ...
[ -0.36645063757896423, 0.7498546242713928, -1.150168776512146, 0.4013145864009857, -0.4507247507572174, -2.0779550075531006, 0.5517228841781616, 1.1645087003707886, 0.73329097032547, 0.682418942451477, -0.201043963432312, 0.06280678510665894, 0.17301972210407257, 0.453433096408844, -1.418...
css/reference/at-rules/@supports/index.md
CSS - At-rules - @supports - Syntax - Declaration syntax: The declaration syntax checks if a browser supports the specified `<property>: <value>` declaration. The declaration must be surrounded by parentheses. The following example returns true if the browser supports the expression `transform-origin: 5% 5%`: Example...
[ -0.08196685463190079, -0.058751512318849564, -0.8291999101638794, 0.6870818138122559, 0.08879385888576508, -1.5661259889602661, -0.06291237473487854, 2.014981746673584, 0.7680097222328186, 0.09042499959468842, 0.22083503007888794, -0.22332663834095, 0.31210842728614807, -0.0852813273668289...
css/reference/at-rules/@supports/index.md
CSS - At-rules - @supports - Syntax - Function syntax: The function syntax checks if a browser supports values or expressions within the function. The functions supported in the function syntax are described in the following sections.
[ -0.29014843702316284, -0.03245888650417328, -1.1624411344528198, 0.3076378405094147, -0.2307155579328537, -1.2824668884277344, 0.36117473244667053, 1.1622756719589233, 0.3844817578792572, 0.017286505550146103, -0.4456876218318939, -0.2235395759344101, 0.43183448910713196, 0.160033211112022...
css/reference/at-rules/@supports/index.md
CSS - At-rules - @supports - Syntax - Function syntax - `at-rule()`: This function checks if a browser supports the specified at-rule. The following example returns true and applies the contained CSS styles if the browser supports the `@keyframes` at-rule: Example: @supports at-rule(@keyframes) { }
[ -1.1225271224975586, 0.15403443574905396, -1.000014066696167, -0.22899574041366577, -0.3295601010322571, -1.5744061470031738, 0.8122864961624146, 1.0668003559112549, -0.3774128258228302, 0.28255292773246765, 0.16017992794513702, -0.4395201504230499, 0.20969559252262115, 0.41711366176605225...
css/reference/at-rules/@supports/index.md
CSS - At-rules - @supports - Syntax - Function syntax - `selector()`: This function evaluates if a browser supports the specified selector syntax. The following example returns true and applies the contained CSS styles if the browser supports the child combinator: Example: @supports selector(h2 > p) { }
[ -1.6822069883346558, -0.5972366333007812, -1.0814533233642578, 0.6876074075698853, -0.2838425040245056, -1.56899893283844, 0.8896155953407288, 1.0333762168884277, 0.1405162513256073, 0.25532299280166626, 0.05570133775472641, 0.2499636709690094, 0.3412225544452667, -0.06110817566514015, -...
css/reference/at-rules/@supports/index.md
CSS - At-rules - @supports - Syntax - Function syntax - `font-tech()`: This function checks if a browser supports the specified font technology for layout and rendering. The following example returns true and applies the contained CSS styles if the browser supports the `COLRv1` font technology: Example: @supports fo...
[ -0.09018872678279877, 0.14909689128398895, -0.3037634789943695, -0.3890882134437561, 0.3234318196773529, -1.0820822715759277, 0.44102048873901367, 1.6145082712173462, -0.1393015831708908, -0.07218014448881149, -0.16907306015491486, 0.5707919001579285, 0.6000787615776062, 0.266531378030777,...
css/reference/at-rules/@supports/index.md
CSS - At-rules - @supports - Syntax - Function syntax - `font-format()`: This function checks if a browser supports the specified font format for layout and rendering. The following example returns true and applies the contained CSS styles if the browser supports the `opentype` font format: Example: @supports font-f...
[ -1.098899245262146, 0.07882354408502579, -1.0622717142105103, 0.1020536869764328, 0.6686204075813293, -1.240870475769043, -0.6107450723648071, 1.4300978183746338, 0.13418076932430267, -0.29824429750442505, 0.7403807640075684, -0.4405001401901245, 0.4200608432292938, 0.14361752569675446, ...
css/reference/at-rules/@supports/index.md
CSS - At-rules - @supports - Syntax - The not operator: The `not` operator precedes an expression resulting in the negation of the expression. The following returns true if the browser's `transform-origin` property considers `10em 10em 10em` to be invalid: Example: @supports not (transform-origin: 10em 10em 10em) { ...
[ -0.20938646793365479, 0.5309197902679443, -0.8372230529785156, 0.06389956176280975, 0.29392045736312866, -1.6583774089813232, -0.45614010095596313, 1.7669317722320557, 0.21221348643302917, 0.44718846678733826, -0.3558531105518341, -1.0392045974731445, 0.2178896814584732, 0.0413869246840477...
css/reference/at-rules/@supports/index.md
CSS - At-rules - @supports - Syntax - The and operator: The `and` operator creates a new expression from the conjunction of two shorter expressions. It returns true only if both of the shorter expressions are also true. The following example returns true if and only if the two shorter expressions are simultaneously tr...
[ 0.3905678391456604, 0.6536716818809509, -1.0672138929367065, 1.1411274671554565, -0.12942910194396973, -1.4613113403320312, -0.23620854318141937, 1.7733025550842285, 0.7313766479492188, 0.33590447902679443, -1.3695704936981201, -0.7319566011428833, 0.34575778245925903, -0.11711396276950836...
css/reference/at-rules/@supports/index.md
CSS - At-rules - @supports - Syntax - The or operator: The `or` operator creates a new expression from the disjunction of two shorter expressions. It returns true if one or both of the shorter expressions is also true. The following example returns true if at least one of the two shorter expressions is true: Example:...
[ -0.3741092383861542, 0.3951628506183624, -0.5710000395774841, 0.6061724424362183, 0.0957365334033966, -1.5682734251022339, -0.047765444964170456, 1.727954626083374, 0.5253073573112488, 0.22442546486854553, -1.1972678899765015, -1.0768872499465942, 0.4801853895187378, -0.0840902104973793, ...
css/reference/at-rules/@supports/index.md
CSS - At-rules - @supports - Examples - Testing for the support of a CSS property: Example: @supports (animation-name: test) { /* CSS applied when animations are supported without a prefix */ @keyframes { /* Other at-rules can be nested inside */ } }
[ -0.6620132327079773, -0.06852564215660095, -0.4804750382900238, 0.3372414708137512, -0.4832688570022583, -1.3837215900421143, 0.7763387560844421, 0.6450695991516113, -0.44019779562950134, 0.3697356879711151, -0.20006950199604034, -0.9083742499351501, 0.05135856568813324, 0.2316072583198547...
css/reference/at-rules/@supports/index.md
CSS - At-rules - @supports - Examples - Testing for the support of a given CSS property or a prefixed version: Example: @supports (text-stroke: 10px) or (-webkit-text-stroke: 10px) { /* CSS applied when text-stroke, prefixed or not, is supported */ }
[ -1.1785454750061035, 0.17490872740745544, -0.4210869073867798, 0.20584619045257568, -0.08821823447942734, -2.044311046600342, 1.2611247301101685, 0.8150601387023926, 0.0558059960603714, 0.6907925009727478, -0.1353292167186737, -0.0416412279009819, 0.0668313130736351, 0.2386433482170105, ...
css/reference/at-rules/@supports/index.md
CSS - At-rules - @supports - Examples - Testing for the non-support of a specific CSS property: Example: @supports not ((text-align-last: justify) or (-moz-text-align-last: justify)) { /* CSS to provide fallback alternative for text-align-last: justify */ }
[ -0.7857406735420227, 0.021809473633766174, -0.26340538263320923, 0.039678461849689484, -0.5837297439575195, -1.5682356357574463, 0.576913595199585, 0.7578639984130859, -0.17415784299373627, 0.40438467264175415, 0.039527855813503265, -0.8040039539337158, 0.3213059902191162, 0.36902901530265...
css/reference/at-rules/@supports/index.md
CSS - At-rules - @supports - Examples - Testing for the support of a selector: CSS conditional rules provide the ability to test for the support of a selector such as `:has()`. Example: /* This rule won't be applied in browsers that don't support :has() */ ul:has(> li li) { /* CSS is applied when the :has(…) pseud...
[ -0.3506966531276703, 0.13038498163223267, -0.8921866416931152, 0.20707836747169495, 0.3994722366333008, -2.054511070251465, 0.2561921179294586, 1.8600568771362305, -0.3078320026397705, -0.18416538834571838, 0.544106125831604, -0.6317182779312134, -0.048085782676935196, 0.737273097038269, ...
css/reference/at-rules/@supports/index.md
CSS - At-rules - @supports - Examples - Testing for the support of a font technology: The following example applies the Bungee Spice color font if the browser supports the `COLRv1` font technology: Example: @supports font-tech(color-COLRv1) { body { font-family: "Bungee Spice", fantasy; } } It's also possib...
[ -1.9531103372573853, 0.5105773210525513, 0.695171058177948, -0.054771386086940765, 0.16407519578933716, -0.8584350943565369, 0.02836184948682785, 1.1215100288391113, -0.26060518622398376, 0.41402363777160645, -0.06733566522598267, -0.7128982543945312, 0.7339092493057251, 0.2582150995731354...
css/reference/at-rules/@supports/index.md
CSS - At-rules - @supports - Examples - Testing for the support of a font format: The following example uses the WOFF2 version of the font if the browser supports this font format, otherwise it falls back to the previously specified WOFF version: Example: @font-face { font-family: "Open Sans WOFF"; src: url("ope...
[ -1.2565261125564575, 0.22568468749523163, -0.49683502316474915, 0.33165380358695984, 0.29948684573173523, -0.9702546000480652, -0.1841166466474533, 1.585684061050415, 0.14241527020931244, -0.34088292717933655, -0.48717695474624634, 0.01143171638250351, -0.14609423279762268, 0.0727705508470...
css/reference/at-rules/@supports/index.md
CSS - At-rules - @supports - Examples - Testing for the support of an at-rule: The following example applies a set of scoped color scheme styles if the browser supports the `@scope` at-rule: Example: @supports at-rule(@scope) { @scope (.light-scheme) { :scope { background-color: plum; } a { ...
[ -0.6900777220726013, 0.24212032556533813, -0.4421726167201996, -0.35841506719589233, 0.5031225085258484, -1.2259297370910645, -0.45560574531555176, 1.2070531845092773, -0.24280975759029388, 0.49198004603385925, 0.10544288158416748, -0.09581334888935089, 0.0931982770562172, 0.39738908410072...
css/reference/at-rules/@container/index.md
CSS - At-rules - @container: The `@container` CSS at-rule is a conditional group rule that applies styles to a containment context. Style declarations are filtered by a condition and applied to the elements within the container if the condition is true. The condition is evaluated when the queried container size, `<sty...
[ 0.007929951883852482, -0.024224525317549706, -1.622208833694458, 0.1307791918516159, 0.46994709968566895, -2.4191205501556396, -1.2110434770584106, 1.8496180772781372, -0.8048579096794128, 0.6772861480712891, 0.8390976190567017, -0.7034170031547546, -0.34459397196769714, 0.0215837806463241...
css/reference/at-rules/@container/index.md
CSS - At-rules - @container - Syntax: Example: /* With a <size-query> */ @container (width > 400px) { h2 { font-size: 1.5em; } } /* With an optional <container-name> */ @container tall (height > 30rem) { p { line-height: 1.6; } } /* With a <container-name> only (query is optional) */ @container side...
[ -0.991126298904419, 0.22290433943271637, -0.2853020429611206, 0.18695276975631714, 0.27856823801994324, -1.2155596017837524, -1.1948528289794922, 1.5436112880706787, -0.05087966471910477, 0.3999616503715515, 0.11998799443244934, 0.4001501500606537, 0.3559175729751587, 0.3283509910106659, ...
css/reference/at-rules/@container/index.md
CSS - At-rules - @container - Syntax - Parameters: - `<container-condition>`: One or both of `<container-name>` and `<container-query>`. Styles defined in the `<stylesheet>` are applied if the condition is `true`. - `<container-name>` (optional): The name of the container to query; it is specified as an `ident`. If ...
[ -0.3506633937358856, -0.3016408383846283, -1.0408345460891724, 0.08286838233470917, -0.7218856811523438, -1.3698161840438843, -0.06841567158699036, 1.6081405878067017, -0.272028386592865, 0.2200721949338913, -0.3803527057170868, 0.014455929398536682, -0.6959356069564819, 1.012655258178711,...
css/reference/at-rules/@container/index.md
CSS - At-rules - @container - Syntax - Logical keywords in container queries: Logical keywords can be used to define the container condition: - `and` combines two or more conditions. - `or` combines two or more conditions. - `not` negates the condition. Only one `not` condition is allowed per container query and it c...
[ -0.7390190362930298, 0.19385100901126862, -0.34595611691474915, -0.15115618705749512, 0.4396589994430542, -1.1650245189666748, -0.7581047415733337, 0.9830490350723267, -0.11892388761043549, -0.16831651329994202, -0.13484753668308258, -0.3580798804759979, -0.47081324458122253, 0.27968502044...
css/reference/at-rules/@container/index.md
CSS - At-rules - @container - Syntax - Named containment contexts: A containment context can be named using the `container-name` property. Example: .post { container-name: sidebar; container-type: inline-size; } The shorthand syntax for this is to use `container` in the form `container: <name> / <type>`, for ex...
[ -0.43628448247909546, -0.20278100669384003, -0.42564907670021057, 0.4669399857521057, 0.14124861359596252, -1.4734069108963013, -0.4471500515937805, 1.2930492162704468, 0.02956266701221466, 0.1465808004140854, -0.7344492673873901, 0.2920120358467102, -0.09998457878828049, 0.130112543702125...
css/reference/at-rules/@container/index.md
CSS - At-rules - @container - Syntax - Descriptors: The `<container-condition>` queries include size, scroll-state, and anchored container descriptors.
[ -0.8242042064666748, -0.2873239815235138, -0.8900436758995056, -0.37770283222198486, -1.245672583580017, 0.6410955786705017, -0.9771115183830261, 1.3499507904052734, -0.3333585560321808, 0.24106687307357788, 0.06944908946752548, -0.30332785844802856, -0.474312961101532, 0.3744077682495117,...
css/reference/at-rules/@container/index.md
CSS - At-rules - @container - Syntax - Descriptors - Size container descriptors: The `<container-condition>` can include one or more boolean size queries, each within a set of parentheses. A size query includes a size descriptor, a value, and — depending on the descriptor — a comparison operator. The queries always me...
[ -0.6048060655593872, 0.33719947934150696, -0.5612710118293762, -0.2886623740196228, 0.501275897026062, -0.5678699612617493, -0.32224828004837036, 1.4303938150405884, 0.17192557454109192, -0.0779571533203125, -0.15099719166755676, 0.2459723949432373, -0.21704822778701782, -0.064688019454479...
css/reference/at-rules/@container/index.md
CSS - At-rules - @container - Syntax - Descriptors - Scroll-state container descriptors: Scroll-state container descriptors are specified inside the `<container-condition>` as an argument for the `scroll-state()` function, for example: Example: @container scroll-state(scrollable: top) { /* … */ } @container scroll...
[ 0.15572147071361542, 0.18764761090278625, -0.4190281927585602, 0.15264184772968292, 0.7346739172935486, -0.5626680254936218, 0.5688828229904175, 1.2329230308532715, -0.7022449970245361, -0.12439946830272675, -0.20620684325695038, 0.6043996810913086, -0.4312223494052887, 0.5962184071540833,...
css/reference/at-rules/@container/index.md
CSS - At-rules - @container - Syntax - Descriptors - Anchored container descriptors: Anchored container descriptors are specified inside the `<container-condition>` as an argument for the `anchored()` function, for example: Example: @container anchored(fallback: top) { /* … */ } @container anchored(fallback: flip-...
[ -0.6313171982765198, -0.7773874998092651, -0.9588689208030701, -0.03436572477221489, -0.20336133241653442, -1.3004916906356812, 0.5361761450767517, 1.5725820064544678, -0.43536511063575745, 1.1209465265274048, -0.2383788824081421, -0.2260371297597885, -0.14027589559555054, 1.49489140510559...
css/reference/at-rules/@container/index.md
CSS - At-rules - @container - Examples - Setting styles based on a container's size: Consider the following example of a card component with a title and some text: Example: <div class="post"> <div class="card"> <h2>Card title</h2> <p>Card content</p> </div> </div> A container context can be created usin...
[ -0.8197890520095825, -0.01800074428319931, -0.9536316990852356, 0.3076833486557007, 0.4308640956878662, -1.290828824043274, -1.0147242546081543, 1.8109098672866821, -0.4388560652732849, 0.060726098716259, 0.4165913462638855, 0.45596808195114136, -0.38464289903640747, 0.46995723247528076, ...
css/reference/at-rules/@container/index.md
CSS - At-rules - @container - Examples - Creating named container contexts: Given the following HTML example which is a card component with a title and some text: Example: <div class="post"> <div class="card"> <h2>Card title</h2> <p>Card content</p> </div> </div> First, create a container context using ...
[ -1.331131100654602, -0.19405856728553772, 0.19314897060394287, 0.22752848267555237, 0.8593520522117615, -1.2253987789154053, 0.22191444039344788, 0.8223584294319153, -0.4033048748970032, 0.3858577311038971, -0.1494244635105133, 0.2573111057281494, 0.0680999606847763, 0.3431617319583893, ...
css/reference/at-rules/@container/index.md
CSS - At-rules - @container - Examples - Nested container queries: It's not possible to target multiple containers in a single container query. It is possible to nest container queries which has the same effect. The following query evaluates to true and applies the declared style if the container named `summary` is w...
[ -1.6309692859649658, 0.2591281533241272, -0.5972405672073364, 0.045711398124694824, 0.4499218463897705, -1.2031246423721313, -0.4200719892978668, 1.390567660331726, -0.17949482798576355, -0.0862160176038742, 0.14500553905963898, 0.4808785319328308, -0.2538180947303772, 0.09106823801994324,...
css/reference/at-rules/@container/index.md
CSS - At-rules - @container - Examples - Container style queries: Container queries can also evaluate the computed style of the container element. A container style query is a `@container` query that uses one or more `style()` functional notations. The boolean syntax and logic combining style features into a style que...
[ -0.3021394610404968, -0.17741429805755615, -1.410133719444275, -0.10740891844034195, 0.6390650868415833, -1.3253114223480225, -0.6049449443817139, 2.29697322845459, -0.13346096873283386, -0.19397659599781036, 0.5549191236495972, 0.35645827651023865, 0.5090137124061584, 0.09766434133052826,...
css/reference/at-rules/@container/index.md
CSS - At-rules - @container - Examples - Container style queries - Range syntax: In addition to the plain `<style-feature-name>: <value>` form described above, a `<style-feature>` can be written as a range comparison using `=`, `<`, `<=`, `>`, or `>=`. Range syntax enables numeric comparisons that the plain form can't...
[ -0.47760435938835144, -0.09171737730503082, -0.5325515270233154, -0.13638140261173248, 0.9699198007583618, -0.6139043569564819, -0.17409349977970123, 1.9538770914077759, 0.30156829953193665, -0.4490622580051422, -0.10618379712104797, 1.109381079673767, -0.5008604526519775, 0.10755278170108...
css/reference/at-rules/@container/index.md
CSS - At-rules - @container - Examples - Scroll-state queries: See Using container scroll-state queries for scroll-state query examples.
[ -1.2582392692565918, 0.26902884244918823, -0.74691241979599, 0.34648558497428894, -0.9113090634346008, 0.9530082941055298, -0.18063102662563324, 1.7540096044540405, -0.8588950634002686, 0.3083922266960144, -0.0057957470417022705, 0.11840875446796417, -0.5554923415184021, 0.2329893112182617...
css/reference/at-rules/@container/index.md
CSS - At-rules - @container - Examples - Anchored queries: See Using anchored container queries for anchored query examples.
[ -0.08930926024913788, 0.4352717697620392, -0.10897737741470337, 0.012235064059495926, -1.5141068696975708, 0.11894528567790985, -0.09656111896038055, 1.4310277700424194, -0.9030115604400635, 0.5516955256462097, 0.022779464721679688, -0.17941002547740936, -0.7209469676017761, 0.036977544426...
css/reference/at-rules/@media/index.md
CSS - At-rules - @media: The `@media` CSS at-rule can be used to apply part of a style sheet based on the result of one or more media queries. With it, you specify a media query and a block of CSS to apply to the document if and only if the media query matches the device on which the content is being used. Note: In J...
[ -0.06860189139842987, -0.4433717131614685, -0.8192300796508789, -0.19221626222133636, 0.5426221489906311, -1.2681959867477417, -1.0710033178329468, 1.380908727645874, -0.9255751371383667, 0.02692095935344696, 1.1494550704956055, 0.2123507559299469, 0.5741719007492065, -0.18274971842765808,...
css/reference/at-rules/@media/index.md
CSS - At-rules - @media - Syntax: Example: /* At the top level of your code */ @media screen and (width >= 900px) { article { padding: 1rem 3rem; } } /* Nested within another conditional at-rule */ @supports (display: flex) { @media screen and (width >= 900px) { article { display: flex; } }...
[ -0.9705828428268433, -0.09153939038515091, -0.4123137593269348, -0.3921889066696167, -0.3857986032962799, -0.6616525650024414, -0.11940015107393265, 1.1451762914657593, -0.3128179907798767, 0.25253885984420776, -0.12444198876619339, 0.4154757261276245, -0.6636186838150024, 0.52098834514617...
css/reference/at-rules/@media/index.md
CSS - At-rules - @media - Description: A media query's `<media-query-list>` includes `<media-type>`s, `<media-feature>s`, and logical operators.
[ -1.1974725723266602, -0.6119776964187622, -0.39020439982414246, -0.07766885310411453, -0.5629209280014038, 0.8024299740791321, -0.2682119309902191, 0.9781074523925781, -0.25525858998298645, 0.030737977474927902, 0.1706615835428238, -0.6207132339477539, 0.10688403248786926, -0.3095479905605...
css/reference/at-rules/@media/index.md
CSS - At-rules - @media - Description - Media types: A `<media-type>` describes the general category of a device. Except when using the `only` logical operator, the media type is optional and the `all` type is implied. - `all`: Suitable for all devices. - `print`: Intended for paged material and documents viewed on a...
[ -0.6649779677391052, 0.3350202739238739, -1.0227482318878174, -0.130899578332901, 0.7461433410644531, -0.05454575642943382, -0.34547749161720276, 0.8061809539794922, -0.17914161086082458, 0.11585189402103424, 0.44272440671920776, -0.12116440385580063, 0.5121545195579529, 0.4374487996101379...
css/reference/at-rules/@media/index.md
CSS - At-rules - @media - Description - Media features: A `<media feature>` describes specific characteristics of the `user agent`, output device, or environment. Media feature expressions test for their presence, value, or range of values, and are entirely optional. Each media feature expression must be surrounded by...
[ -0.6624041199684143, 0.20428311824798584, -1.0115678310394287, -0.05128491669893265, 0.18376243114471436, -0.2601560354232788, -0.5219472646713257, 1.97280752658844, -0.30160221457481384, 0.5137022733688354, 0.00012905150651931763, -0.24508777260780334, 0.13079902529716492, 0.0319423079490...
css/reference/at-rules/@media/index.md
CSS - At-rules - @media - Description - Logical operators: The logical operators `not`, `and`, `only`, and `or` can be used to compose a complex media query. You can also combine multiple media queries into a single rule by separating them with commas. - `and`: Used for combining multiple media features together into...
[ -0.7790910005569458, 0.4018760919570923, -0.4118013381958008, -0.037669770419597626, 0.5046823024749756, -0.2053513079881668, -0.4837450385093689, 1.554086446762085, -0.4519900679588318, -0.040429022163152695, -0.4222032427787781, 0.0018764659762382507, 0.36046504974365234, 0.0081569254398...
css/reference/at-rules/@media/index.md
CSS - At-rules - @media - Description - User agent client hints: Some media queries have corresponding user agent client hints. These are HTTP headers that request content that is pre-optimized for the particular media requirement. They include `Sec-CH-Prefers-Color-Scheme` and `Sec-CH-Prefers-Reduced-Motion`.
[ -1.4445306062698364, -0.68035888671875, -1.5071710348129272, 0.4235948324203491, -0.21724830567836761, -0.974335253238678, -0.004526544362306595, 0.39433369040489197, -0.8745273351669312, 0.7050139904022217, -0.3721090853214264, -0.6283518671989441, -0.9424700140953064, -0.0220453329384326...
css/reference/at-rules/@media/index.md
CSS - At-rules - @media - Accessibility: To best accommodate people who adjust a site's text size, use `em`s when you need a `&lt;length&gt;` for your media queries. Both `em` and `px` are valid units, but `em` works better if the user changes the browser text size. Also consider media queries or HTTP user agent cli...
[ -0.37947455048561096, -0.29240942001342773, -0.8921517133712769, 0.4759201407432556, -0.56089186668396, -1.7520852088928223, 0.08669273555278778, 0.08568454533815384, 0.2400231957435608, 0.3796137273311615, -0.44992029666900635, 0.017165303230285645, -0.2720729112625122, -0.568023800849914...
css/reference/at-rules/@media/index.md
CSS - At-rules - @media - Security: Because media queries provide insights into the capabilities—and by extension, the features and design—of the device the user is working with, there is the potential that they could be abused to construct a "fingerprint" which identifies the device, or at least categorizes it to som...
[ -0.759722888469696, -0.15611165761947632, -1.3103102445602417, 0.02290888875722885, -0.5411767959594727, 0.1542147845029831, 0.47166335582733154, 1.1339579820632935, -0.8532752990722656, 0.3558681905269623, -0.4329148232936859, 0.3228840231895447, -0.2535821795463562, -0.49382197856903076,...
css/reference/at-rules/@media/index.md
CSS - At-rules - @media - Examples - Testing for print and screen media types: Example: @media print { body { font-size: 10pt; } } @media screen { body { font-size: 13px; } } @media screen, print { body { line-height: 1.2; } } The range syntax allows for less verbose media queries when test...
[ -0.9444012641906738, 0.8737837672233582, -0.6278088688850403, -0.4219312369823456, 0.6454809308052063, -1.1234959363937378, -0.41912418603897095, 1.5543413162231445, -0.013266526162624359, -0.25142598152160645, -0.03957499563694, 0.4103944003582001, -0.37709537148475647, 0.3038061559200287...