file stringlengths 16 94 | text stringlengths 32 24.4k | vector list |
|---|---|---|
css/reference/at-rules/@font-face/font-weight/index.md | CSS - At-rules - @font-face - font-weight - Syntax - Variable fonts:
Most fonts have a particular weight which corresponds to one of the numbers in Common weight name mapping. However some fonts, called variable fonts, can support a range of weights with more or less fine granularity, and this can give the designer a ... | [
-0.6477051377296448,
0.20799620449543,
-0.9011788964271545,
-0.0008012726902961731,
-0.215809166431427,
-2.787656784057617,
0.6225389242172241,
1.6205570697784424,
0.6722205877304077,
-0.5524998307228088,
-0.3248065710067749,
0.2813625931739807,
-0.6075824499130249,
0.048922598361968994,
... |
css/reference/at-rules/@font-face/font-weight/index.md | CSS - At-rules - @font-face - font-weight - Accessibility:
People experiencing low vision conditions may have difficulty reading text set with a `font-weight` value of `100` (Thin/Hairline) or `200` (Extra Light), especially if the font has a low contrast color ratio.
- MDN Understanding WCAG, Guideline 1.4 explanati... | [
-1.2796725034713745,
0.27383869886398315,
-0.4443313181400299,
-0.7990487813949585,
-0.230965256690979,
-1.105090618133545,
0.4408718943595886,
1.4578012228012085,
0.5905274748802185,
0.6762898564338684,
-0.6164485812187195,
-0.3223145306110382,
-0.0835784375667572,
-0.04416076838970184,
... |
css/reference/at-rules/@font-face/font-weight/index.md | CSS - At-rules - @font-face - font-weight - Examples - Selecting normal and bold fonts:
In this example we include two fonts, one normal weight, one bold weight, from the "Fira Sans" font family using two `@font-face` at rules. We set `font-weight` descriptors to match the weight of the fonts.
After this, CSS rules c... | [
-0.9493289589881897,
0.48375433683395386,
-0.5409985780715942,
-0.0625494122505188,
-0.2720907926559448,
-1.966441035270691,
1.221908688545227,
1.9569158554077148,
0.8848593235015869,
0.4636373519897461,
0.3060015141963959,
0.5967108011245728,
-0.5955273509025574,
-0.2017516791820526,
-0... |
css/reference/at-rules/@font-face/font-weight/index.md | CSS - At-rules - @font-face - font-weight - Examples - Selecting normal and bold fonts - HTML:
Example:
<p class="one">Fira Sans, `normal` weight paragraph</p>
<p class="two">Fira Sans, `bold` weight paragraph</p>
<p><strong>Fira Sans, <strong> element (`bold`)</strong></p> | [
-0.7144894599914551,
0.6193904280662537,
-0.6638590693473816,
0.11589927971363068,
0.3015201687812805,
-2.1966471672058105,
0.030777473002672195,
1.2209285497665405,
-0.11493629217147827,
0.02879983000457287,
0.04414358735084534,
-0.32891109585762024,
-0.35367584228515625,
0.50785589218139... |
css/reference/at-rules/@font-face/font-weight/index.md | CSS - At-rules - @font-face - font-weight - Examples - Selecting normal and bold fonts - CSS:
Example:
@font-face {
font-family: "Fira Sans";
font-weight: normal;
src: url("https://mdn.github.io/shared-assets/fonts/FiraSans-Regular.woff2");
}
@font-face {
font-family: "Fira Sans";
font-weight: bold;
src:... | [
-0.9051653742790222,
0.5067176222801208,
-0.7191945314407349,
-0.2395065873861313,
0.35486626625061035,
-1.607329249382019,
-0.2031339854001999,
1.4154473543167114,
0.0523214191198349,
-0.008840074762701988,
0.5649251341819763,
-0.295751690864563,
-0.3718658983707428,
0.5113134980201721,
... |
css/reference/at-rules/@font-face/font-weight/index.md | CSS - At-rules - @font-face - font-weight - Examples - Setting font-weight ranges:
This example demonstrates how authors can include multiple fonts for multiple font-weights (and font-styles), by including multiple `@font-face` declarations with the same `font-family` value. By setting the `font-weight` descriptors us... | [
-0.49671804904937744,
0.45929744839668274,
-0.5393064618110657,
0.6564415097236633,
-0.30388525128364563,
-1.0394012928009033,
0.823013961315155,
1.5461442470550537,
1.086643099784851,
-0.4215821325778961,
0.1772848218679428,
1.0507807731628418,
-0.4344575107097626,
-0.5268966555595398,
... |
css/reference/at-rules/@font-face/font-weight/index.md | CSS - At-rules - @font-face - font-weight - Examples - Setting font-weight ranges - HTML:
Example:
<p class="one">This has a font weight of 100</p>
<p class="three">This has a font weight of 300</p>
<p class="four">This has a font weight of 400</p>
<p class="five">This has a font weight of 500</p>
<p class="seven">Th... | [
-1.2100239992141724,
0.12586292624473572,
-0.1757674664258957,
0.12051741778850555,
-0.5628286600112915,
-2.02998685836792,
1.467549204826355,
1.7152801752090454,
0.2883639335632324,
0.06685356795787811,
-0.05533124506473541,
0.6905626654624939,
-0.5022889375686646,
-0.9364140033721924,
... |
css/reference/at-rules/@font-face/font-weight/index.md | CSS - At-rules - @font-face - font-weight - Examples - Setting font-weight ranges - CSS:
We include four `@font-face` declarations for four different fonts from the `FireSans` font family, as seen in the previous example. Each declaration is set to a different range of font-weight values, but all use the same font nam... | [
-0.42626726627349854,
1.0727537870407104,
-1.247420310974121,
-0.1187727153301239,
0.78804612159729,
-2.13344407081604,
-0.3984517753124237,
2.037508487701416,
0.5657365322113037,
0.041772618889808655,
0.7097259759902954,
0.3268330991268158,
-0.5229357481002808,
0.12491217255592346,
-0.9... |
css/reference/at-rules/@font-face/font-weight/index.md | CSS - At-rules - @font-face - font-weight - Examples - Setting a range for a variable font:
In this example we're using the `font-weight` descriptor to restrict the range of weights that can be set when using a variable font.
We include a variable font, "League Mono", using a single `@font-face` at-rule. We use a `fo... | [
0.27517786622047424,
0.6543933153152466,
-1.1091703176498413,
0.29169607162475586,
0.2432807981967926,
-1.7404171228408813,
-0.12595240771770477,
1.8875685930252075,
0.3924393057823181,
-0.6435943841934204,
0.652392566204071,
-0.10556173324584961,
-0.8665555715560913,
0.19782990217208862,
... |
css/reference/at-rules/@font-face/font-weight/index.md | CSS - At-rules - @font-face - font-weight - Examples - Setting a range for a variable font - HTML:
We include a paragraph with `<output>` initially set to `400`, as that is the default font-weight for unstyled paragraph text. This paragraph is nestled between two other paragraphs, so you can compare rendered versus de... | [
-1.1089221239089966,
0.6326274871826172,
-0.6555504202842712,
0.5281355977058411,
-0.008732013404369354,
-1.0684809684753418,
0.452333927154541,
1.2493607997894287,
-0.11683366447687149,
-0.2854757010936737,
0.07248466461896896,
0.2788086235523224,
-0.5953069925308228,
0.3716713488101959,
... |
css/reference/at-rules/@font-face/font-weight/index.md | CSS - At-rules - @font-face - font-weight - Examples - Setting a range for a variable font - CSS:
We set the `font-weight` descriptor range to `300 700`, clamping the variable font to that range.
Example:
@font-face {
font-family: "LeagueMono";
src: url("https://mdn.github.io/shared-assets/fonts/LeagueMono-VF.tt... | [
-0.5877097845077515,
0.4564199447631836,
-1.2772499322891235,
0.2704754173755646,
0.12484978139400482,
-2.2582855224609375,
0.2138971984386444,
1.382453203201294,
-0.08989700675010681,
-0.7128377556800842,
0.7352756261825562,
0.019855089485645294,
-0.873371422290802,
0.06727278232574463,
... |
css/reference/at-rules/@font-face/font-weight/index.md | CSS - At-rules - @font-face - font-weight - Examples - Setting a range for a variable font - JavaScript:
We include an event handler that updates the paragraph's `font-weight` property value, and updates the text to reflect the change:
Example:
const text = document.querySelector("#example");
const log = document.qu... | [
-0.5809203386306763,
0.2816959023475647,
-0.3269207775592804,
0.45224130153656006,
-0.21693921089172363,
-2.1347339153289795,
0.329970121383667,
1.2874205112457275,
0.31423020362854004,
-0.04080302640795708,
-0.03409675508737564,
0.8143616318702698,
-0.9843468070030212,
-0.2078276723623275... |
css/reference/at-rules/@media/scan/index.md | CSS - At-rules - @media - scan:
The `scan` CSS media feature is used to apply CSS styles based on the scanning process of the output device. | [
-1.1656345129013062,
0.18863333761692047,
-1.5317195653915405,
0.10096074640750885,
-0.10972421616315842,
0.18495962023735046,
-0.47934338450431824,
1.4101486206054688,
0.16691507399082184,
1.019197940826416,
0.11610288918018341,
0.9022884368896484,
-0.17924772202968597,
0.9490082263946533... |
css/reference/at-rules/@media/scan/index.md | CSS - At-rules - @media - scan - Syntax:
The `scan` feature is specified as one of the following keyword values:
- `interlace`: The output device uses "interlaced" rendering, where video frames alternate between specifying only the "even" lines on the screen and only the "odd" lines.
- `progressive`: The output devic... | [
-0.48423099517822266,
-0.019304724410176277,
-0.42644718289375305,
-0.3916507661342621,
0.7456737160682678,
-0.04489929974079132,
-0.44726282358169556,
0.9577500820159912,
0.0029478073120117188,
0.21514619886875153,
-0.21948891878128052,
-0.5103214979171753,
0.00008600950241088867,
0.67447... |
css/reference/at-rules/@media/scan/index.md | CSS - At-rules - @media - scan - Description:
Most modern screens (and all computer screens) use progressive rendering, displaying each screen fully with no special treatment.
Interlacing was used by CRT monitors and some plasma TVs to enable the appearance of faster frames per second (FPS) while reducing bandwidth. ... | [
-0.7010447382926941,
-0.5124406814575195,
-0.8245600461959839,
0.34416505694389343,
-0.06547977030277252,
0.058028444647789,
0.2554280459880829,
0.566241443157196,
0.5775899291038513,
-0.15577097237110138,
-0.6021225452423096,
0.2078719437122345,
-0.1875193566083908,
0.6827950477600098,
... |
css/reference/at-rules/@media/scan/index.md | CSS - At-rules - @media - scan - Examples - HTML:
Example:
<p>This is a test.</p> | [
-0.3735067844390869,
0.3191836476325989,
-0.5567651987075806,
-0.12511475384235382,
-0.9120184183120728,
-0.14019253849983215,
0.4083169102668762,
1.6748656034469604,
0.14944425225257874,
0.38571807742118835,
-0.3525162637233734,
0.47423672676086426,
-0.3787953853607178,
-0.301151633262634... |
css/reference/at-rules/@media/scan/index.md | CSS - At-rules - @media - scan - Examples - CSS:
Example:
p {
padding: 10px;
border: solid;
}
@media screen and (scan: interlace) {
p {
background: #f4ae8a;
}
}
@media screen and (scan: progressive) {
p {
text-decoration: underline;
}
}
@media not screen and (scan: progressive) {
p {
border... | [
-0.4327054023742676,
0.47298315167427063,
-0.7345908284187317,
-0.9644396305084229,
0.4567040205001831,
-1.144410252571106,
-0.341066837310791,
1.3253142833709717,
-0.6476885080337524,
0.12213301658630371,
0.5050233602523804,
-0.5208127498626709,
-0.2791025638580322,
0.24794897437095642,
... |
css/reference/values/transform-function/rotate/index.md | CSS - Values - transform-function - rotate:
The `rotate()` CSS function defines a transformation that rotates an element around a fixed point on the 2D plane, without deforming it. Its result is a `<transform-function>` data type.
Example:
transform: rotate(0);
Example:
transform: rotate(90deg);
Example:
t... | [
0.09809806197881699,
-0.08123518526554108,
-1.944129228591919,
0.17925748229026794,
0.609345555305481,
-1.6530017852783203,
0.09033753722906113,
1.6376583576202393,
-0.11828342080116272,
-0.15981639921665192,
1.366489052772522,
-0.2830795347690582,
-0.2711232304573059,
0.34927603602409363,... |
css/reference/values/transform-function/rotate/index.md | CSS - Values - transform-function - rotate - Syntax:
Example:
rotate(a) | [
-0.18521012365818024,
0.6674333810806274,
-1.2199347019195557,
-0.025472156703472137,
-1.2275683879852295,
0.03349151089787483,
1.5200704336166382,
2.067272663116455,
0.399286150932312,
-0.42400985956192017,
0.17576612532138824,
0.3369002342224121,
-0.2657483220100403,
-0.34691327810287476... |
css/reference/values/transform-function/rotate/index.md | CSS - Values - transform-function - rotate - Syntax - Values:
- a: Is an `<angle>` representing the angle of the rotation. The direction of rotation depends on the writing direction. In a left-to-right context, a positive angle denotes a clockwise rotation, a negative angle a counter-clockwise one. In a right-to... | [
-1.6532917022705078,
-0.33951693773269653,
-1.0205142498016357,
0.3101676404476166,
-0.6480900049209595,
-0.3463500738143921,
0.7224025726318359,
1.028178334236145,
0.5972248911857605,
-0.30837470293045044,
-0.4771014451980591,
-0.2310742437839508,
-0.11926514655351639,
0.29619988799095154... |
css/reference/values/transform-function/rotate/index.md | CSS - Values - transform-function - rotate - Examples - Basic example - HTML:
Example:
<div>Normal</div>
<div class="rotated">Rotated</div> | [
-1.1192717552185059,
-0.010897474363446236,
-0.7675084471702576,
0.3717631697654724,
-0.7315234541893005,
0.09699637442827225,
1.2311053276062012,
1.2659125328063965,
-0.06850102543830872,
0.07314261794090271,
-0.03761626034975052,
-0.046450525522232056,
-0.6689009070396423,
-0.33186757564... |
css/reference/values/transform-function/rotate/index.md | CSS - Values - transform-function - rotate - Examples - Basic example - CSS:
Example:
div {
width: 80px;
height: 80px;
background-color: skyblue;
}
.rotated {
transform: rotate(45deg); /* Equal to rotateZ(45deg) */
background-color: pink;
} | [
-1.9334602355957031,
-0.2806553244590759,
-0.8686426281929016,
-0.3885432779788971,
-0.4599272310733795,
0.7351544499397278,
1.3225691318511963,
0.8299968838691711,
-0.3931242823600769,
0.2835765779018402,
0.19227592647075653,
0.09869125485420227,
0.02983754128217697,
0.3258659541606903,
... |
css/reference/values/transform-function/rotate/index.md | CSS - Values - transform-function - rotate - Examples - Combining rotation with another transformation:
If you want to apply multiple transformations to an element, be careful about the order in which you specify your transformations. For example, if you rotate before translating, the translation will be along the new... | [
-0.3856803774833679,
-0.17295348644256592,
-1.1285343170166016,
1.0286407470703125,
-0.8033475875854492,
0.6800462007522583,
1.14110267162323,
1.1055153608322144,
-0.2961796224117279,
-0.037741873413324356,
0.19477128982543945,
-0.37770745158195496,
0.34699493646621704,
-0.2788714766502380... |
css/reference/values/transform-function/rotate/index.md | CSS - Values - transform-function - rotate - Examples - Combining rotation with another transformation - HTML:
Example:
<div>Normal</div>
<div class="rotate">Rotated</div>
<div class="rotate-translate">Rotated + Translated</div>
<div class="translate-rotate">Translated + Rotated</div> | [
-1.8081200122833252,
-0.16841629147529602,
-0.6236029863357544,
0.7340644598007202,
-0.7975385189056396,
0.35486912727355957,
1.1669962406158447,
1.3093876838684082,
0.2223542034626007,
0.18980924785137177,
0.06188119947910309,
0.14852331578731537,
-0.4848938286304474,
0.019885212182998657... |
css/reference/values/transform-function/rotate/index.md | CSS - Values - transform-function - rotate - Examples - Combining rotation with another transformation - CSS:
Example:
div {
position: absolute;
left: 40px;
top: 40px;
width: 100px;
height: 100px;
background-color: lightgray;
}
.rotate {
background-color: transparent;
outline: 2px dashed;
transform... | [
-1.6304960250854492,
-0.20586106181144714,
-0.691238522529602,
-0.2920062243938446,
-0.12742842733860016,
-0.44907212257385254,
0.29013657569885254,
1.2718933820724487,
-0.6470015645027161,
0.10704252868890762,
0.2655784487724304,
-0.2343820035457611,
0.032900258898735046,
0.75116842985153... |
css/reference/values/repeat/index.md | CSS - Values - repeat:
The `repeat()` CSS function represents a repeated fragment of the track list or rule-line list. It allows repeated patterns of columns, rows, and their gap decorations, to be written in a compact form.
Example:
grid-template-columns: repeat(2, 60px);
rule-color: repeat(2, green, orange), yello... | [
-0.7085421085357666,
-0.5822371244430542,
-1.5124555826187134,
-0.01418241672217846,
0.3569834530353546,
-1.583601713180542,
-0.3190578818321228,
1.7901899814605713,
-0.933229386806488,
0.392434298992157,
0.474636971950531,
0.4788461923599243,
0.5367956757545471,
0.5623963475227356,
-1.0... |
css/reference/values/repeat/index.md | CSS - Values - repeat - Syntax:
Example:
/* <track-repeat> values */
repeat(4, 1fr)
repeat(4, [col-start] 250px [col-end])
repeat(4, [col-start] 60% [col-end])
repeat(4, [col-start] 1fr [col-end])
repeat(4, [col-start] min-content [col-end])
repeat(4, [col-start] max-content [col-end])
repeat(4, [col-start] auto [col... | [
-1.334733486175537,
0.5148242712020874,
-0.4389888346195221,
-0.25085046887397766,
0.0870310515165329,
-0.9539543986320496,
0.016702696681022644,
1.4616256952285767,
-0.4803966283798218,
-0.10227211564779282,
-0.367732971906662,
0.13368281722068787,
-0.19353844225406647,
0.431347519159317,... |
css/reference/values/repeat/index.md | CSS - Values - repeat - Syntax - Values:
The `repeat()` function takes two arguments: The first argument specifies repeat count, and the second specifies the repeated values list (the list of values to be repeated). | [
-0.7597953081130981,
0.02123240754008293,
-1.5200198888778687,
0.5934370160102844,
-0.18486452102661133,
-1.1717174053192139,
1.0380438566207886,
1.3482959270477295,
-0.9888683557510376,
-0.07694301009178162,
-0.8015124797821045,
-0.1842498481273651,
-0.4357416033744812,
0.2325905561447143... |
css/reference/values/repeat/index.md | CSS - Values - repeat - Syntax - Values - Repeat count values:
- `integer`: A positive integer greater than or equal to `1` specifying the number of times the feature list in the second parameter will be repeated.
- `auto-fill`: Specifies an auto repeater that repeats to fill a space. Resolves to the largest number of... | [
-0.9033129811286926,
-0.4777236878871918,
-1.3601070642471313,
0.17768526077270508,
-0.08007464557886124,
-1.6765828132629395,
1.4463932514190674,
1.0595742464065552,
-0.656680703163147,
-0.10955716669559479,
-1.0845867395401,
0.23329472541809082,
-0.15324687957763672,
0.7730963826179504,
... |
css/reference/values/repeat/index.md | CSS - Values - repeat - Syntax - Values - Repeated values list:
A list from one of the following track list types. Whether the components of the list are comma- or space-separated, depends on which separator is expected for that property value list type.
- `<line-names>`: To add line names to subgrids, each `<line-na... | [
-1.1791675090789795,
0.037136539816856384,
-0.8978168368339539,
0.12220646440982819,
0.38309627771377563,
-1.0319972038269043,
0.42046302556991577,
1.341130256652832,
-0.5498480796813965,
-0.11778081953525543,
-0.41067081689834595,
-0.12862104177474976,
-0.38238605856895447,
0.616172373294... |
css/reference/values/repeat/index.md | CSS - Values - repeat - Description:
The `repeat()` function represents a repeated fragment within a comma- or space-separated values list, that allows a recurring pattern to be written in a more compact form that can be repeated a specified number of times or can be auto-repeated.
The generic form of the `repeat()` ... | [
-0.8494969606399536,
0.07769230753183365,
-1.0588788986206055,
0.19804872572422028,
0.711956799030304,
-1.0634297132492065,
0.35270413756370544,
0.5731878876686096,
-0.6164658069610596,
-0.04815109074115753,
-0.14141401648521423,
-0.04688173532485962,
0.102556511759758,
0.6431081891059875,... |
css/reference/values/repeat/index.md | CSS - Values - repeat - Description - Syntax forms:
The syntax of the `repeat()` function has several forms:
- `<track-repeat>` = `repeat( <integer>, [ <line-names>? <track-size> ]+ <line-names>? )`: The `<integer>` sets the repeat count.
- `<auto-repeat>` = `repeat( auto-fill | auto-fit, [ <line-names>? <fixed-size>... | [
-1.2500622272491455,
0.0011367080733180046,
-1.580172061920166,
0.41881680488586426,
-0.04710468649864197,
-1.7057174444198608,
1.3422483205795288,
1.3086484670639038,
-1.1294529438018799,
0.18072234094142914,
-0.6284192800521851,
0.6071093678474426,
-0.19256079196929932,
0.964363932609558... |
css/reference/values/repeat/index.md | CSS - Values - repeat - Description - Auto-fit versus auto-fill:
When the first parameter of the `repeat()` function is a keyword, either `auto-fill`, `auto-fit`, or `auto`, rather than an integer, it creates an auto-repeater. An auto-repeating `repeat()` function repeats the values provided as the second parameter as... | [
-1.3910553455352783,
-0.425706684589386,
-1.5893365144729614,
0.8432281613349915,
-0.1418389081954956,
-1.9173911809921265,
0.6204996705055237,
0.7390029430389404,
-0.6623715758323669,
0.36322030425071716,
-0.4495658278465271,
-0.3008658289909363,
-0.6110150218009949,
1.1161580085754395,
... |
css/reference/values/repeat/index.md | CSS - Values - repeat - Description - Use exceptions and rules:
There are some rules and restrictions when using `repeat()`:
A property value can contain multiple `repeat()` functions.
Example:
.wrapper {
grid-template-columns:
repeat(2, 10px)
repeat(2, minmax(min-content, max-content));
}
A property val... | [
-0.8942960500717163,
0.39893877506256104,
-1.1677998304367065,
0.7956327795982361,
0.5904015302658081,
-1.3945317268371582,
0.3743857741355896,
1.412105917930603,
-0.8190804719924927,
0.005799752660095692,
-0.4509839415550232,
0.630215048789978,
-0.24176420271396637,
0.4587326645851135,
... |
css/reference/values/repeat/index.md | CSS - Values - repeat - Examples - Specifying grid columns using repeat() - HTML:
Example:
<div id="container">
<div>This item is 50 pixels wide.</div>
<div>Item with flexible width.</div>
<div>This item is 50 pixels wide.</div>
<div>Item with flexible width.</div>
<div>Inflexible item of 100 pixels width.<... | [
-2.21816349029541,
-0.15121708810329437,
-0.6808425188064575,
0.07373218238353729,
-0.06339747458696365,
-1.3060593605041504,
0.5165782570838928,
0.5460953116416931,
-1.1985290050506592,
0.2859424948692322,
-0.2361193150281906,
0.9192323088645935,
-0.3649994134902954,
0.6119479537010193,
... |
css/reference/values/repeat/index.md | CSS - Values - repeat - Examples - Specifying grid columns using repeat() - CSS:
Example:
#container {
display: grid;
grid-template-columns: repeat(2, 50px 1fr) 100px;
grid-gap: 5px;
box-sizing: border-box;
height: 200px;
width: 100%;
background-color: #8cffa0;
padding: 10px;
}
#container > div {
b... | [
-2.063586711883545,
-0.011570572853088379,
-0.49521490931510925,
-0.6032001376152039,
0.44354522228240967,
-1.3738075494766235,
0.2585497796535492,
1.0779340267181396,
-1.6284915208816528,
0.7872161865234375,
-0.35865601897239685,
-0.304649293422699,
-0.06963552534580231,
1.238462567329406... |
css/reference/values/color_value/alpha/index.md | CSS - Values - color value - alpha:
The `alpha()` CSS function takes an origin `color` and returns that same color with a modified alpha (transparency) channel. The color components of the origin color are preserved unchanged. The result is in the same color space as the origin color. | [
-0.5296019911766052,
-0.3540439307689667,
-1.3427997827529907,
-0.5020036697387695,
-0.3017594814300537,
-1.5971521139144897,
0.9484380483627319,
1.1744424104690552,
-0.47654643654823303,
0.3226146101951599,
0.41359081864356995,
0.4171203672885895,
-0.3433617055416107,
0.6504363417625427,
... |
css/reference/values/color_value/alpha/index.md | CSS - Values - color value - alpha - Syntax:
Example:
/* Replace alpha with a fixed value */
alpha(from red / 50%)
alpha(from var(--my-color) / 80%)
/* Derive alpha relative to the origin color's alpha */
alpha(from var(--my-color) / calc(alpha * 0.5)) | [
-0.16677573323249817,
-0.07614971697330475,
-0.8440583944320679,
0.3695821464061737,
-1.0028793811798096,
-1.8170366287231445,
0.7298188209533691,
2.171250820159912,
0.5929998755455017,
-0.7111169695854187,
0.6450499892234802,
0.488186776638031,
-0.9143535494804382,
0.5252638459205627,
-... |
css/reference/values/color_value/alpha/index.md | CSS - Values - color value - alpha - Syntax - Parameters:
- `from <color>`: The relative color syntax keyword `from` followed by any valid `<color>` value, defining the origin color. The color components of the origin color are carried through to the result unchanged; only the alpha channel is affected.
- `/ <al... | [
-0.5883368849754333,
-0.20560574531555176,
-0.2919166088104248,
0.013915710151195526,
0.27876901626586914,
-0.4176943004131317,
-0.13375195860862732,
1.325881004333496,
0.013609439134597778,
-0.2939729690551758,
-0.6472436189651489,
-0.06624142080545425,
0.01342713087797165,
0.391505181789... |
css/reference/values/color_value/alpha/index.md | CSS - Values - color value - alpha - Syntax - Return value:
A color value in the same color space as the origin color, with identical color components and a modified alpha channel value as specified. | [
-0.034228723496198654,
-0.02968265675008297,
-1.0095176696777344,
-0.13233761489391327,
-0.6126630902290344,
-0.36647194623947144,
0.5042212605476379,
1.8931875228881836,
-0.3072846531867981,
-0.060066089034080505,
-0.2299593836069107,
0.5444451570510864,
-0.413396418094635,
1.171043753623... |
css/reference/values/color_value/alpha/index.md | CSS - Values - color value - alpha - Description:
The `alpha()` function is a relative color function that lets you adjust the transparency of any color without rewriting its other components. This is particularly useful when you need a semi-transparent variant of a design token or custom property color, and you want ... | [
-1.120590090751648,
-0.22646893560886383,
-0.5835233926773071,
-0.2527884244918823,
0.32675665616989136,
-0.7789592146873474,
0.31047675013542175,
1.1763445138931274,
0.15690891444683075,
0.4714513123035431,
0.19074583053588867,
0.6781527996063232,
-0.0013258960098028183,
0.205687314271926... |
css/reference/values/color_value/alpha/index.md | CSS - Values - color value - alpha - Examples - Replacing the alpha of a color:
In this example, we specify two colors. The second color is defined by passing the first color into the `alpha()` function, setting its alpha channel to a fixed value of `80%` in the process. The two colors are set as the `background-color... | [
-0.9087128639221191,
-0.5146111845970154,
-0.7150512933731079,
-0.1782965064048767,
0.16007152199745178,
-0.6244515180587769,
-0.06893077492713928,
0.9321033358573914,
-0.2805787920951843,
-0.3690240681171417,
0.34775203466415405,
-0.22352007031440735,
-0.28707611560821533,
0.6117513775825... |
css/reference/values/color_value/alpha/index.md | CSS - Values - color value - alpha - Examples - Deriving a semi-transparent variant:
This example is very similar to the previous one, except that this time the alpha of the second color is computed as half of the first color's alpha, using the `alpha` component keyword inside a `calc()` expression.
Example:
<div cl... | [
-0.7666465044021606,
0.36917844414711,
-0.6441357731819153,
0.3494872450828552,
-0.0351700633764267,
-1.2808054685592651,
1.2299375534057617,
1.6988732814788818,
0.759077787399292,
0.21180839836597443,
-0.0063683707267045975,
0.31942084431648254,
-0.6820415258407593,
0.34429073333740234,
... |
css/reference/values/color_value/alpha/index.md | CSS - Values - color value - alpha - Examples - Fading a color on hover:
In this example, an element's background fades to `40%` opacity on `:hover`, while the color itself stays the same.
Example:
<button class="card">Hover over me</button>
Example:
:root {
--brand: oklch(55% 0.22 270);
}
.card {
background-... | [
-1.3679670095443726,
-0.26484787464141846,
-1.1017447710037231,
-0.48342180252075195,
0.2168005108833313,
-1.2332574129104614,
0.28640997409820557,
1.8098657131195068,
-0.18335579335689545,
-0.19634875655174255,
-0.16889703273773193,
-0.2772623896598816,
-0.27748364210128784,
-0.1571603715... |
css/reference/values/basic-shape/index.md | CSS - Values - basic-shape:
The `<basic-shape>` CSS data type represents a shape used in the `border-shape`, `clip-path`, `offset-path`, and `shape-outside` properties.
Example:
clip-path: inset(22% 12% 15px 35px);
Example:
clip-path: circle(6rem at 12rem 8rem);
Example:
clip-path: ellipse(115px 55px at 50% 40%)... | [
-1.1518875360488892,
-0.4304518401622772,
-1.5885329246520996,
-0.14604277908802032,
0.22737723588943481,
-1.651811957359314,
1.266034722328186,
1.3115003108978271,
-0.4358963072299957,
-0.16760975122451782,
-0.04340018704533577,
0.7558823823928833,
-0.2747144103050232,
-0.1496969908475875... |
css/reference/values/basic-shape/index.md | CSS - Values - basic-shape - Syntax:
The `<basic-shape>` data type is used to create basic shapes including rectangles by container inset, by coordinate distance, or by set dimensions, circles, ellipses, polygons, paths, and author created shapes. These basic shapes are defined using one `<basic_shape>` CSS functions,... | [
-0.6923019886016846,
-0.36566486954689026,
-1.255989670753479,
0.4073817729949951,
0.7061672806739807,
-1.6360738277435303,
1.3145666122436523,
0.8601913452148438,
0.1758119761943817,
-0.450804740190506,
-0.16273801028728485,
0.5596652626991272,
0.007640432566404343,
0.044675059616565704,
... |
css/reference/values/basic-shape/index.md | CSS - Values - basic-shape - Syntax - Common parameters:
The parameters common across the syntax of some basic shape functions include:
- `round <'border-radius'>`: Defines rounded corners for rectangles by container insets, rectangles by distance, and rectangles with dimensions using the same syntax as the CSS `bord... | [
-0.735440731048584,
0.5858421921730042,
-0.9438191652297974,
-0.03898376226425171,
0.495292603969574,
-1.1841967105865479,
0.10680793225765228,
0.5667369961738586,
-0.02221454679965973,
-0.03607233241200447,
-0.05205993354320526,
-0.07220976799726486,
-0.14009955525398254,
0.53695154190063... |
css/reference/values/basic-shape/index.md | CSS - Values - basic-shape - Syntax - Syntax for rectangles: `<basic-shape-rect>`:
The `<basic-shape-rect>` type, a subset of the `<basic-shape>` type, represents the basic-shape functions limited to creating rectangles, including `inset()`, `rect()`, and `xywh()`.
The `polygon()`, `path()`, and `shape()` functions c... | [
-1.030155897140503,
0.640932023525238,
-0.8961449861526489,
0.2551477253437042,
0.24469619989395142,
-1.5014222860336304,
1.0595406293869019,
0.9593543410301208,
0.41994792222976685,
-0.6790066361427307,
-0.3118036091327667,
0.47943586111068726,
0.5071753859519958,
-0.22022008895874023,
... |
css/reference/values/basic-shape/index.md | CSS - Values - basic-shape - Syntax - Syntax for rectangles: `<basic-shape-rect>` - Syntax for rectangles by container insets:
The `inset()` function creates an inset rectangle, with its size defined by the offset distance of each of the four sides of its container and, optionally, rounded corners.
Example:
inset( <... | [
-1.1290514469146729,
0.4643075168132782,
-0.8416684865951538,
-0.1968199461698532,
0.8480240106582642,
-1.023849368095398,
0.07081258296966553,
1.174319863319397,
0.1753365695476532,
-0.04017822444438934,
-0.10365835577249527,
0.6424689888954163,
0.5408269166946411,
-0.17859654128551483,
... |
css/reference/values/basic-shape/index.md | CSS - Values - basic-shape - Syntax - Syntax for rectangles: `<basic-shape-rect>` - Syntax for rectangles by distance:
The `rect()` function defines a rectangle using the specified distances from the top and left edges of the reference box, with optional rounded corners.
Example:
rect( [ <length-percentage> | auto ]... | [
-1.388608694076538,
0.2403353452682495,
-0.67476487159729,
0.10337427258491516,
0.1309448480606079,
-0.7898250222206116,
1.345647931098938,
0.5385074019432068,
0.09556590020656586,
-0.09239981323480606,
-0.6008780002593994,
1.1672947406768799,
0.2565554678440094,
0.1353234499692917,
0.45... |
css/reference/values/basic-shape/index.md | CSS - Values - basic-shape - Syntax - Syntax for rectangles: `<basic-shape-rect>` - Syntax for rectangles with dimensions:
The `xywh()` function defines a rectangle located at the specified distances from the left (`x`) and top (`y`) edges of the reference box and sized by the specified width (`w`) and height (`h`) of... | [
-1.2980811595916748,
-0.0388636514544487,
-0.6145501732826233,
-0.3786345422267914,
0.559714138507843,
-1.3135547637939453,
0.5754193067550659,
0.7374467253684998,
0.640116274356842,
-0.19112162292003632,
0.000033099204301834106,
0.5410767197608948,
0.2837960720062256,
0.23330923914909363,... |
css/reference/values/basic-shape/index.md | CSS - Values - basic-shape - Syntax - Syntax for circles:
The `circle()` function defines a circle using a radius and a position.
Example:
circle( <shape-radius>? [ at <position> ]? )
The `<shape-radius>` argument represents the radius of the circle defined as either a `length` or a `percentage`. A percentage value... | [
-1.1595269441604614,
0.38939040899276733,
-0.7290673851966858,
0.005410473793745041,
-0.023754216730594635,
-1.1133208274841309,
1.3081995248794556,
0.7258386611938477,
0.7696749567985535,
0.4155381917953491,
-0.1675722599029541,
0.5854083299636841,
-0.21073488891124725,
0.1837950050830841... |
css/reference/values/basic-shape/index.md | CSS - Values - basic-shape - Syntax - Syntax for ellipses:
The `ellipse()` function defines an ellipse using two radii and a position.
Example:
ellipse( [ <shape-radius>{2} ]? [ at <position> ]? )
The `<shape-radius>` arguments represent rx and ry, the x-axis and y-axis radii of the ellipse, in that order. These va... | [
-1.0665339231491089,
0.5570050477981567,
-0.6109786629676819,
0.0646667405962944,
-0.2977205514907837,
-1.3861560821533203,
1.0874624252319336,
1.104222297668457,
0.8251402378082275,
0.1803397536277771,
0.17487281560897827,
0.6380329132080078,
-0.006722370162606239,
0.1878305822610855,
1... |
css/reference/values/basic-shape/index.md | CSS - Values - basic-shape - Syntax - Syntax for polygons:
The `polygon()` function defines a polygon using an SVG `fill-rule` and a set of coordinates.
Example:
polygon( <'fill-rule'>? , [ <length-percentage> <length-percentage> ]# )
The function takes a list of comma-separated coordinate pairs, each consisting of... | [
-0.9205854535102844,
-0.40547242760658264,
-1.1991708278656006,
-0.6416663527488708,
0.3996247351169586,
-1.537838339805603,
1.0602664947509766,
0.8427401185035706,
0.6437061429023743,
-0.5141711235046387,
-0.06188080459833145,
1.101830244064331,
0.28848955035209656,
0.2737760841846466,
... |
css/reference/values/basic-shape/index.md | CSS - Values - basic-shape - Syntax - Syntax for paths:
The `path()` function defines a shape using an SVG `fill-rule` and an SVG path definition.
Example:
path( <'fill-rule'>? , <string> )
The required `<string>` is an SVG path as a quoted string. The `path()` function is not a valid `shape-outside` property value... | [
-1.4629197120666504,
0.22304320335388184,
-0.6428947448730469,
0.47837597131729126,
0.6882690191268921,
-1.6498984098434448,
0.6936720013618469,
1.0622557401657104,
-0.3185933828353882,
-0.16731789708137512,
0.7496539950370789,
0.2794339954853058,
0.09619250893592834,
-0.11719376593828201,... |
css/reference/values/basic-shape/index.md | CSS - Values - basic-shape - Syntax - Syntax for shapes:
The `shape()` function defines a shape using an initial starting point and a series of shape commands.
Example:
shape( <'fill-rule'>? from <coordinate-pair> , <shape-command># )
The `from <coordinate-pair>` parameter represents the starting point for the firs... | [
-1.0342415571212769,
0.09631937742233276,
-1.3035578727722168,
0.4317539930343628,
0.5037596225738525,
-1.2618757486343384,
1.3198949098587036,
1.5402216911315918,
0.15032266080379486,
-0.3430512547492981,
0.18032436072826385,
0.6833834052085876,
-0.29829931259155273,
-0.6198599934577942,
... |
css/reference/values/basic-shape/index.md | CSS - Values - basic-shape - Description:
When creating a shape, the reference box is defined by the property that uses `<basic-shape>` values. The coordinate system for the shape has its origin at the top-left corner of the element's margin box by default, with the x-axis running to the right and the y-axis running d... | [
-1.37058687210083,
0.1762894093990326,
-1.3563663959503174,
-0.16641853749752045,
0.04557026922702789,
-0.742093026638031,
1.591841459274292,
1.5640480518341064,
0.17506194114685059,
0.1720515340566635,
-0.20494940876960754,
0.46027034521102905,
-0.09483794122934341,
0.726070761680603,
0... |
css/reference/values/basic-shape/index.md | CSS - Values - basic-shape - Description - Computed values of basic shapes:
The values in a `<basic-shape>` function are computed as specified, with the following additional considerations:
- For any omitted values, their defaults are used.
- A `<position>` value in `circle()` or `ellipse()` is computed as a pa... | [
-0.6225336194038391,
-0.01429704762995243,
-1.2054250240325928,
0.42547792196273804,
0.06090855598449707,
-1.0590864419937134,
1.9208790063858032,
1.0662788152694702,
0.08248549699783325,
-0.1382756382226944,
-0.2727665603160858,
0.29944440722465515,
0.18344755470752716,
0.3180041015148163... |
css/reference/values/basic-shape/index.md | CSS - Values - basic-shape - Description - Interpolation of basic shapes:
When animating between two `<basic-shape>` functions, the `interpolation` rules listed below are followed. The parameter values of each `<basic-shape>` function form a list. For interpolation to occur between two shapes, both shapes must use the... | [
-0.2792966365814209,
-0.10620181262493134,
-0.8201633095741272,
0.395926833152771,
0.499281644821167,
-1.3473016023635864,
0.39082199335098267,
0.9033567905426025,
-0.29376882314682007,
-0.31893643736839294,
-0.15868781507015228,
-0.325234979391098,
0.20283295214176178,
0.6060997843742371,... |
css/reference/values/basic-shape/index.md | CSS - Values - basic-shape - Examples - Animated polygon:
In this example, we use the @keyframes at-rule to animate a clip path between two polygons. Note that both polygons have the same number of vertices, which is necessary for this type of animation to work. | [
-0.1440397948026657,
-0.4713115096092224,
-0.242837056517601,
-0.009568456560373306,
-0.23907384276390076,
-0.3772667646408081,
1.7523419857025146,
1.0793298482894897,
-0.7366007566452026,
-0.07601135224103928,
-0.0851251631975174,
-0.45900872349739075,
0.26221829652786255,
-0.224595651030... |
css/reference/values/basic-shape/index.md | CSS - Values - basic-shape - Examples - Animated polygon - HTML:
Example:
<div></div> | [
-0.17932294309139252,
-0.7550019025802612,
-0.34400200843811035,
-0.3816474676132202,
-0.3911987245082855,
-0.8955292105674744,
2.4838600158691406,
0.7883870005607605,
-0.7817937135696411,
-0.4121038317680359,
0.16063082218170166,
0.3065321743488312,
-0.45875948667526245,
-0.43527641892433... |
css/reference/values/basic-shape/index.md | CSS - Values - basic-shape - Examples - Animated polygon - CSS:
Example:
div {
width: 300px;
height: 300px;
background: repeating-linear-gradient(red, orange 50px);
clip-path: polygon(
50% 0%,
60% 40%,
100% 50%,
60% 60%,
50% 100%,
40% 60%,
0% 50%,
40% 40%
);
animation: 4s p... | [
-1.3770136833190918,
-0.9280089735984802,
-0.651852011680603,
-0.787273645401001,
0.09792549908161163,
-1.0566070079803467,
2.2784523963928223,
1.237646222114563,
-0.5052417516708374,
-0.12421715259552002,
0.06225453317165375,
0.7440599203109741,
-0.2736739218235016,
0.27541831135749817,
... |
css/reference/values/basic-shape/circle/index.md | CSS - Values - basic-shape - circle:
The `circle()` CSS function defines a circle using a radius and a position. It is one of the `basic-shape` data types.
Example:
clip-path: circle(50px);
Example:
clip-path: circle(6rem at right center);
Example:
clip-path: circle(10% at 2rem 90%);
Example:
clip-path: circle... | [
-2.0362677574157715,
-0.2023143321275711,
-1.2784782648086548,
-0.4137533903121948,
0.35808467864990234,
-0.9456155300140381,
1.2120320796966553,
1.0607268810272217,
-0.3980129063129425,
0.31302985548973083,
0.2686869502067566,
0.5933558940887451,
-0.28672850131988525,
0.13530558347702026,... |
css/reference/values/basic-shape/circle/index.md | CSS - Values - basic-shape - circle - Syntax:
Example:
shape-outside: circle(50%);
clip-path: circle(6rem at 12rem 8rem);
border-shape: circle(60%); | [
-0.6829901933670044,
0.1616075336933136,
-0.5491645932197571,
-0.4936777949333191,
-0.45952877402305603,
-0.10864167660474777,
0.7169246077537537,
1.1262462139129639,
-0.23140215873718262,
-0.5200416445732117,
-0.4165440499782562,
0.7934704422950745,
-0.8679744005203247,
-0.208024904131889... |
css/reference/values/basic-shape/circle/index.md | CSS - Values - basic-shape - circle - Syntax - Values:
- `<shape-radius>`: This may be a `length`, a `percentage`, or any of the following keyword values:
- `closest-side`: The radius is the length from the center of the circle to the closest side of the reference box, so that the circle's boundary just touches that... | [
-0.6087941527366638,
0.11315558850765228,
-0.2845023572444916,
-0.23809640109539032,
0.41565418243408203,
-0.8820509314537048,
0.42471861839294434,
0.8994907140731812,
0.39928004145622253,
-0.2478100061416626,
-0.10467568784952164,
0.05806338042020798,
-0.20791251957416534,
0.2473693490028... |
css/reference/values/basic-shape/circle/index.md | CSS - Values - basic-shape - circle - Examples - Basic circle:
In the example below, the `shape-outside` property has a value of `circle(50%)`, which defines a circle on a floated element for the text to flow round.
Example:
<div class="box">
<img
alt="A hot air balloon"
src="https://mdn.github.io/shared-a... | [
-0.60580974817276,
0.6363224387168884,
-0.4742008149623871,
-0.04031416028738022,
0.7659503221511841,
-1.1205661296844482,
0.3497588634490967,
1.2654701471328735,
-0.05304311215877533,
0.0001169135794043541,
0.17159868776798248,
0.5221606492996216,
-0.4769380986690521,
-0.5556281805038452,... |
css/reference/values/basic-shape/circle/index.md | CSS - Values - basic-shape - circle - Examples - Radius keyword interactive example:
This example allows you to test the effect of moving the center point of the circle when using each of the four `<shape-radius>` keywords. | [
0.3809826374053955,
0.30588337779045105,
-0.46017178893089294,
0.17184746265411377,
-0.28596925735473633,
-0.6210389733314514,
1.7111787796020508,
0.41556137800216675,
0.2613353729248047,
-0.25342053174972534,
-0.2670523524284363,
0.23361825942993164,
-1.4163153171539307,
-0.99023467302322... |
css/reference/values/basic-shape/circle/index.md | CSS - Values - basic-shape - circle - Examples - Radius keyword interactive example - HTML:
The HTML first defines controls for selecting a chosen radius keyword and setting the position where the circle is to be displayed, followed by a `pre` element for displaying the `clip-path` that the control values select. Afte... | [
-1.4402964115142822,
0.5520973205566406,
-1.016456127166748,
0.4386994242668152,
0.1452077329158783,
-1.3087565898895264,
0.20776693522930145,
1.2432836294174194,
-0.2998359203338623,
0.35317572951316833,
-0.05739985406398773,
0.13859401643276215,
0.07872887700796127,
0.39083945751190186,
... |
css/reference/values/basic-shape/circle/index.md | CSS - Values - basic-shape - circle - Examples - Radius keyword interactive example - CSS:
The CSS for the canvas, reference box, and fill elements is shown below. Note that the `.fill` defines a gradient that overflows the reference box, filling most of the canvas. This is the gradient that we will clip using the `ci... | [
0.2704335153102875,
0.24435549974441528,
-1.0863614082336426,
-0.3104240298271179,
0.6078360080718994,
-1.1574333906173706,
0.26087090373039246,
1.7315415143966675,
-0.7855134010314941,
0.17111194133758545,
0.9030423760414124,
0.8676409125328064,
0.47319525480270386,
0.8922427296638489,
... |
css/reference/values/basic-shape/circle/index.md | CSS - Values - basic-shape - circle - Examples - Radius keyword interactive example - JavaScript:
First we get handles to each of the elements used by the example.
Example:
const select = document.getElementById("radius-keyword");
const posX = document.getElementById("pos-x");
const posY = document.getElementById("p... | [
-0.3697456419467926,
0.39298486709594727,
-0.8178595304489136,
0.14692792296409607,
0.48317694664001465,
-1.4162766933441162,
0.45043879747390747,
1.6853302717208862,
-0.41460931301116943,
0.14695218205451965,
0.357822984457016,
0.042960695922374725,
0.042575083673000336,
0.026878379285335... |
css/reference/values/basic-shape/shape/index.md | CSS - Values - basic-shape - shape:
The `shape()` CSS function is used to define a shape for the `border-shape`, `clip-path`, and `offset-path` properties. It combines an initial starting point with a series of shape commands that define the path of the shape. The `shape()` function is a member of the `basic-shape` da... | [
-0.9245445132255554,
-0.41574251651763916,
-1.7760450839996338,
0.39057281613349915,
0.3461465835571289,
-1.298040509223938,
1.6282981634140015,
1.0121281147003174,
-0.09197895228862762,
0.022630376741290092,
0.21676698327064514,
0.34402409195899963,
-0.030942948535084724,
-0.1051729917526... |
css/reference/values/basic-shape/shape/index.md | CSS - Values - basic-shape - shape - Syntax:
Example:
/* <fill-rule> */
clip-path: shape(nonzero from 0 0, line to 10px 10px);
/* <move-command>, <line-command>, and close */
offset-path: shape(from 10px 10px, move by 10px 5px, line by 20px 40%, close);
/* <hvline-command> */
offset-path: shape(from 10px 10px, hlin... | [
-0.7277849316596985,
0.23467937111854553,
-1.2020927667617798,
-0.08360929787158966,
0.4244052767753601,
-1.4284156560897827,
-0.38854026794433594,
1.4142436981201172,
-0.15043678879737854,
-0.1045970618724823,
0.07670792192220688,
-0.3494816720485687,
0.004019740968942642,
0.1824100315570... |
css/reference/values/basic-shape/shape/index.md | CSS - Values - basic-shape - shape - Syntax - Parameters:
- `<fill-rule>` (optional): Specifies how overlapping regions of a shape should be filled. The possible values include: - `nonzero`: A point is considered inside the shape if a ray drawn from the point crosses more left-to-right than right-to-left path segment... | [
-0.6188583374023438,
0.37929046154022217,
-0.7365380525588989,
-0.04281386360526085,
1.1523045301437378,
-1.2113397121429443,
0.31657370924949646,
1.222815752029419,
-0.255522757768631,
-0.30291885137557983,
0.289347380399704,
-0.04910796135663986,
-0.03813377767801285,
0.03016893565654754... |
css/reference/values/basic-shape/shape/index.md | CSS - Values - basic-shape - shape - Syntax - Parameters - Shape commands:
The syntax of most shape commands is a keyword that provides a directive, such as `move` or `line`, followed by the `by` or `to` keyword, and a set of coordinates.
- `by`: Indicates that the `<coordinate-pair>` is relative to the command's sta... | [
-0.7143109440803528,
0.24659043550491333,
-0.0735299363732338,
0.2925693094730377,
0.7665340304374695,
-0.6433709263801575,
0.6015021800994873,
0.9066299200057983,
-0.20299118757247925,
-0.3564735949039459,
-0.1585048884153366,
-0.1376793086528778,
0.2578640580177307,
-0.08467770367860794,... |
css/reference/values/basic-shape/shape/index.md | CSS - Values - basic-shape - shape - Description:
The `shape()` function allows you to define complex shapes. It is similar to the `path()` shape function in several ways:
- The `<fill-rule>` parameter in the `shape()` function works exactly like the same parameter in the `path()` function.
- The `shape()` function r... | [
-0.45232194662094116,
-0.13214176893234253,
-1.3882908821105957,
0.6532992124557495,
0.6721493601799011,
-1.630284070968628,
-0.08796309679746628,
1.0912351608276367,
0.49811333417892456,
0.19293634593486786,
0.1344681680202484,
0.39553454518318176,
0.10194328427314758,
-0.0556563399732112... |
css/reference/values/basic-shape/shape/index.md | CSS - Values - basic-shape - shape - Examples - Using `shape()` to define a path:
This example demonstrates how the `shape()` function can be used in the `offset-path` property to define the shape of the path an element can follow.
The first shape, `shape1`, follows a cubic Bézier curved path defined by the `curve to... | [
-0.44791001081466675,
0.07076288014650345,
-0.9442005753517151,
0.5955966114997864,
0.4281576871871948,
-1.450147032737732,
-0.02174074947834015,
1.0149459838867188,
-0.20385627448558807,
0.14449165761470795,
0.2990209460258484,
-0.4502181112766266,
-0.1536068171262741,
0.02499806135892868... |
css/reference/values/basic-shape/shape/index.md | CSS - Values - basic-shape - shape - Examples - Using `shape()` to define the visible part of an element:
This example demonstrates how the `shape()` function can be used in the `clip-path` property to create different shapes for the clipping region. The first shape (`shape1`) uses a triangle defined by straight lines... | [
-0.8408149480819702,
0.07009229063987732,
-1.0078521966934204,
0.44171011447906494,
0.4986851215362549,
-1.0886861085891724,
0.03558824211359024,
1.175549030303955,
-0.5314832925796509,
0.14579640328884125,
0.3739231824874878,
-0.2178034633398056,
-0.35271844267845154,
0.5625752210617065,
... |
css/reference/values/basic-shape/shape/index.md | CSS - Values - basic-shape - shape - Examples - Using `shape()` to draw curves with relative control points:
Like previous examples, this example also uses `clip-path` to create different shapes for the clipping regions of the elements. The shapes are specified using a combination of `<curve-command>` and `<smooth-com... | [
-0.7055168747901917,
-0.18251022696495056,
-0.6885771751403809,
0.15978895127773285,
0.17656511068344116,
-0.7068122029304504,
0.5610811710357666,
1.5441176891326904,
0.22340688109397888,
0.32887107133865356,
0.1592555195093155,
-0.2929009795188904,
0.2786127030849457,
0.19390809535980225,... |
css/reference/values/basic-shape/path/index.md | CSS - Values - basic-shape - path:
The `path()` CSS function accepts an SVG path string, and is used in the CSS shapes and CSS motion path modules to enable a shape to be drawn. The `path()` function is a `basic-shape` data type value. It can be used in the CSS `offset-path` and `clip-path` properties and in the SVG `... | [
-0.5728570222854614,
-0.19086354970932007,
-1.7805626392364502,
0.4642482399940491,
0.6304522752761841,
-1.8085205554962158,
0.0452050045132637,
0.8696233034133911,
-0.5517245531082153,
0.20688943564891815,
1.0131710767745972,
0.2424338459968567,
0.7513285875320435,
-0.12913908064365387,
... |
css/reference/values/basic-shape/path/index.md | CSS - Values - basic-shape - path - Syntax:
Example:
path("M 10 80 C 40 10, 65 10, 95 80 S 150 150, 180 80")
/* When used in clip-path only */
path(evenodd,"M 10 80 C 40 10, 65 10, 95 80 S 150 150, 180 80") | [
-0.31257060170173645,
-0.3941502869129181,
-0.9730596542358398,
-0.3220440149307251,
-0.2726760506629944,
-1.637783169746399,
0.8007825613021851,
1.2352899312973022,
-0.5090497732162476,
0.31001272797584534,
-0.34894734621047974,
0.6815617084503174,
-0.03337010368704796,
-0.659603416919708... |
css/reference/values/basic-shape/path/index.md | CSS - Values - basic-shape - path - Syntax - Parameters:
- `<fill-rule>` (optional): Defines what parts of the path are inside the shape. The possible values include: - `nonzero`: A point is considered inside the shape if a ray drawn from the point crosses more left-to-right than right-to-left path segments, resultin... | [
-0.9171202182769775,
-0.5631046891212463,
-0.4895809292793274,
0.678928017616272,
0.24960818886756897,
-1.615010380744934,
1.5420652627944946,
0.7853716015815735,
0.011101439595222473,
0.08047175407409668,
-0.029934268444776535,
-0.051704954355955124,
0.28625965118408203,
-0.61863189935684... |
css/reference/values/basic-shape/path/index.md | CSS - Values - basic-shape - path - Syntax - Return value:
Returns a `basic-shape` value. | [
0.7590999007225037,
-0.4265364706516266,
-1.3024101257324219,
-0.07952897250652313,
-0.4419957399368286,
-0.13645882904529572,
2.3883697986602783,
1.637756109237671,
-0.05948565527796745,
-0.0716208890080452,
-0.403020441532135,
0.731002688407898,
-0.13320773839950562,
0.010794371366500854... |
css/reference/values/basic-shape/path/index.md | CSS - Values - basic-shape - path - Examples - Using a `path()` function as an `offset-path` value:
A `path()` function has been provided as an `offset-path` value in the following example to create an elliptical path for a ball to move along.
Example:
<div id="path">
<div id="ball"></div>
</div>
<button>animate</... | [
-0.7360814809799194,
0.3657352030277252,
-0.6419705152511597,
0.2788906395435333,
0.3391711413860321,
-0.9865290522575378,
0.13877655565738678,
0.8213380575180054,
-0.6431282162666321,
0.30944693088531494,
0.1282210648059845,
0.2533717453479767,
-0.196812242269516,
-0.03146800398826599,
... |
css/reference/values/basic-shape/path/index.md | CSS - Values - basic-shape - path - Examples - Modify the value of the SVG path d attribute:
The `path()` can be used to modify the value of the SVG `d` attribute, which can also be set to `none` in your CSS.
The "V" symbol will flip vertically when you hover over it, if `d` is supported as a CSS property. | [
-1.78547203540802,
-0.4126221239566803,
-0.44232794642448425,
0.6885358691215515,
0.06876946985721588,
-1.1857473850250244,
1.6179922819137573,
0.7599446177482605,
-0.0366055890917778,
-0.30908435583114624,
-0.033202700316905975,
-0.36412501335144043,
0.08451347798109055,
-0.75843566656112... |
css/reference/values/basic-shape/path/index.md | CSS - Values - basic-shape - path - Examples - Modify the value of the SVG path d attribute - CSS:
Example:
html,
body,
svg {
height: 100%;
}
/* This path is displayed on hover */
#svg_css_ex1:hover path {
d: path("M20,80 L50,20 L80,80");
} | [
-1.0635714530944824,
-0.42906102538108826,
-0.5741215348243713,
0.2450723946094513,
-0.3670799136161804,
-0.8456681370735168,
1.26472008228302,
0.26673024892807007,
-0.1742270290851593,
-0.509999692440033,
0.4350370764732361,
0.30689695477485657,
-0.16531629860401154,
-0.7469258308410645,
... |
css/reference/values/basic-shape/path/index.md | CSS - Values - basic-shape - path - Examples - Modify the value of the SVG path d attribute - HTML:
Example:
<svg id="svg_css_ex1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<path fill="none" stroke="red" d="M20,20 L50,80 L80,20" />
</svg> | [
-1.241655945777893,
-0.22624392807483673,
0.015302266925573349,
0.04695822298526764,
-0.434544175863266,
-1.2703378200531006,
1.9955368041992188,
0.16604028642177582,
-0.17136433720588684,
-0.3835667073726654,
0.5477845668792725,
-0.19989722967147827,
0.5687625408172607,
-0.980506598949432... |
css/reference/values/basic-shape/inset/index.md | CSS - Values - basic-shape - inset:
The `inset()` CSS function defines a rectangle at the specified inset distances from each side of the reference box. It is a basic shape function used to define one of the `basic-shape` data types.
Example:
clip-path: inset(30px);
Example:
clip-path: inset(1rem 2rem 3rem 4rem);
... | [
-1.2821118831634521,
0.11912861466407776,
-1.506571650505066,
-0.3548738658428192,
0.8499619960784912,
-1.6804862022399902,
0.35040926933288574,
1.3244696855545044,
-0.41921624541282654,
-0.6415442228317261,
0.5123863220214844,
0.6841017007827759,
0.5266477465629578,
-0.15616923570632935,
... |
css/reference/values/basic-shape/inset/index.md | CSS - Values - basic-shape - inset - Syntax:
Example:
shape-outside: inset(20px 50px 10px 0 round 50px);
border-shape: inset(10px 20px 10px 20px round 20px); | [
0.0904800146818161,
0.8285697102546692,
-1.0954011678695679,
-0.0877854973077774,
0.028057008981704712,
-0.9827901721000671,
0.8847881555557251,
1.5283526182174683,
0.3889580965042114,
-0.5284965634346008,
-0.364033967256546,
1.666509985923767,
-0.48485124111175537,
-0.47847872972488403,
... |
css/reference/values/basic-shape/inset/index.md | CSS - Values - basic-shape - inset - Syntax - Values:
- `<length-percentage>{1,4}`: When all of the four arguments are supplied they represent the top, right, bottom, and left offsets from the reference box inward that define the positions of the edges of the inset rectangle. These arguments follow the syntax of the m... | [
-1.0645782947540283,
0.6717868447303772,
-0.7671476602554321,
-0.5151594281196594,
0.50722336769104,
-1.2515565156936646,
0.3604329526424408,
1.2459911108016968,
0.2525179386138916,
-0.19965189695358276,
0.1010141670703888,
0.50925612449646,
0.7141608595848083,
0.026060573756694794,
0.14... |
css/reference/values/basic-shape/inset/index.md | CSS - Values - basic-shape - inset - Examples - Basic inset example:
In the example below we have an `inset()` shape used to pull content over the floated element. Change the offset values to see how the shape changes.
Example:
<div class="box">
<div class="shape"></div>
<p>
One November night in the year 17... | [
-0.5527810454368591,
0.6713258624076843,
-0.8481285572052002,
-0.29686757922172546,
0.8025604486465454,
-1.1978870630264282,
0.15385745465755463,
1.035902500152588,
-0.37241074442863464,
-0.17235878109931946,
0.30886197090148926,
0.012971460819244385,
0.02504391223192215,
-0.01500678434967... |
css/reference/values/basic-shape/ellipse/index.md | CSS - Values - basic-shape - ellipse:
The `ellipse()` CSS function is one of the `basic-shape` data types.
Example:
clip-path: ellipse(20px 50px);
Example:
clip-path: ellipse(4rem 50% at right center);
Example:
clip-path: ellipse(closest-side closest-side at 5rem 6rem);
Example:
clip-path: ellipse(closest-side... | [
-1.2009838819503784,
0.20521672070026398,
-1.0160751342773438,
0.039758890867233276,
0.3768322765827179,
-2.0051627159118652,
0.45749953389167786,
0.9521701335906982,
-0.725907564163208,
0.0771634578704834,
0.530623733997345,
-0.2739313542842865,
-0.3588376045227051,
0.6851404309272766,
... |
css/reference/values/basic-shape/ellipse/index.md | CSS - Values - basic-shape - ellipse - Syntax:
Example:
shape-outside: ellipse(40% 50% at left);
shape-outside: ellipse(closest-side farthest-side at 30%);
border-shape: ellipse(50% 40%);
An ellipse is essentially a squashed circle and so `ellipse()` acts in a very similar way to `circle()` except that we have to sp... | [
-0.8399959206581116,
0.9070632457733154,
-0.8470971584320068,
-0.07944896072149277,
-0.15567100048065186,
-0.9225209951400757,
0.8105162978172302,
1.7289868593215942,
0.6743537187576294,
0.018597004935145378,
-0.27830970287323,
0.7970155477523804,
-1.2621922492980957,
0.16803424060344696,
... |
css/reference/values/basic-shape/ellipse/index.md | CSS - Values - basic-shape - ellipse - Syntax - Values:
- `<shape-radius>`: Two radii, x and y, in that order. These may be a `length`, a `percentage`, or any of the following keyword values:
- `closest-side`: The radius is the length from the center of the ellipse to the closest side of the reference box in the giv... | [
-0.5907686948776245,
0.13726720213890076,
-0.5055728554725647,
-0.19685599207878113,
0.3174664378166199,
-0.7614076137542725,
0.3441455066204071,
0.9985350370407104,
0.6584204435348511,
-0.0697890892624855,
0.03209194540977478,
0.11505073308944702,
-0.7061784267425537,
0.30499032139778137,... |
css/reference/values/basic-shape/ellipse/index.md | CSS - Values - basic-shape - ellipse - Examples - Basic ellipse() example:
This example shows an ellipse that is floated left that has a horizontal radius of 40%, a vertical radius of 50%, and a left position. This means that the center of the ellipse is on the left edge of the box giving us a half ellipse shape to wr... | [
-0.9679445624351501,
0.7110527157783508,
-0.004032371565699577,
-0.7487879395484924,
0.3357301354408264,
-1.430281162261963,
0.03874209523200989,
0.8755303025245667,
-0.1159697100520134,
-0.3106679916381836,
0.2500075399875641,
0.002070598304271698,
-0.7940187454223633,
0.3124147653579712,... |
css/reference/values/basic-shape/ellipse/index.md | CSS - Values - basic-shape - ellipse - Examples - Using closest-side / farthest-side values:
The keyword values of `closest-side` and `farthest-side` are useful to create a quick ellipse based on the size of the floated element reference box.
Example:
<div class="box">
<div class="shape"></div>
<p>
One Novem... | [
-0.40733811259269714,
0.7899417281150818,
-0.49561333656311035,
-0.1572522521018982,
0.5174686908721924,
-1.4512311220169067,
0.37982961535453796,
0.8094010949134827,
-0.09505507349967957,
0.17242440581321716,
-0.10016316920518875,
-0.05318089947104454,
-0.38482946157455444,
0.275190085172... |
css/reference/values/basic-shape/ellipse/index.md | CSS - Values - basic-shape - ellipse - Examples - Radius keyword interactive example:
This example allows you to test the effect of moving the center point of the ellipse when using each of the four `<shape-radius>` keywords — chosen independently for the x-radius and the y-radius.
Because `closest-corner` and `farth... | [
-0.3113752603530884,
0.7881282567977905,
-0.6889023780822754,
-0.13147440552711487,
0.3311190903186798,
-1.1993348598480225,
0.4139552712440491,
0.4855191111564636,
-0.2668379545211792,
0.02671547792851925,
0.2666967511177063,
-0.4326789379119873,
-0.6980724930763245,
0.2594510614871979,
... |
css/reference/values/basic-shape/ellipse/index.md | CSS - Values - basic-shape - ellipse - Examples - Radius keyword interactive example - HTML:
The HTML first defines controls for selecting the x-radius and y-radius keywords and setting the position where the ellipse is to be displayed, followed by a `pre` element for displaying the `clip-path` that the control values... | [
-0.8721582889556885,
0.5959310531616211,
-0.9296964406967163,
0.3170064687728882,
0.21315991878509521,
-1.4651401042938232,
0.10758265852928162,
0.9637470841407776,
-0.32533225417137146,
0.432188481092453,
0.35872888565063477,
-0.1776430755853653,
-0.20858816802501678,
0.5185684561729431,
... |
css/reference/values/basic-shape/ellipse/index.md | CSS - Values - basic-shape - ellipse - Examples - Radius keyword interactive example - CSS:
The CSS for the canvas, reference box, and fill elements is shown below. Note that the `.fill` defines a gradient that overflows the reference box, filling most of the canvas. This is the gradient that we will clip using the `e... | [
-0.4184125065803528,
0.4823485016822815,
-1.4106802940368652,
-0.35856741666793823,
0.6389513611793518,
-1.6873310804367065,
0.1738303154706955,
1.8517903089523315,
-0.43281909823417664,
0.17885355651378632,
0.8049160242080688,
0.4435362219810486,
0.16817910969257355,
0.7371143698692322,
... |
css/reference/values/basic-shape/ellipse/index.md | CSS - Values - basic-shape - ellipse - Examples - Radius keyword interactive example - JavaScript:
First we get handles to each of the elements used by the example.
Example:
const selectX = document.getElementById("radius-x-keyword");
const selectY = document.getElementById("radius-y-keyword");
const posX = document... | [
-0.13593563437461853,
0.40102657675743103,
-0.59705650806427,
0.007374897599220276,
0.4896496534347534,
-1.4455064535140991,
0.5356763601303101,
1.665490746498108,
-0.28064945340156555,
0.24578212201595306,
0.29297229647636414,
-0.03156804293394089,
-0.07450398802757263,
-0.018398892134428... |
css/reference/values/basic-shape/xywh/index.md | CSS - Values - basic-shape - xywh:
The `xywh()` CSS function creates a rectangle using the specified distances from the left (`x`) and top (`y`) edges of the containing block and the specified width (`w`) and height (`h`) of the rectangle. It is a basic shape function of the `basic-shape` data type. You can use the `x... | [
-0.8261589407920837,
-0.31178224086761475,
-1.4946000576019287,
-0.0851910412311554,
0.8498504757881165,
-1.8367505073547363,
-0.20676223933696747,
0.9871066808700562,
-0.23471228778362274,
-0.10350581258535385,
0.6700688004493713,
0.28976839780807495,
0.019288357347249985,
0.1769218146800... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.