You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-shapes-1/Overview.bs
+6-8Lines changed: 6 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ spec:css-values-5; type:value;
44
44
text:y-end;
45
45
</pre>
46
46
47
-
<style type="text/css">
47
+
<style>
48
48
.singleImgExample {
49
49
display: block;
50
50
margin: auto;
@@ -894,7 +894,7 @@ The ''shape()'' Function</h4>
894
894
and <<arc-size>> has no effect.
895
895
896
896
<figure>
897
-
<img src="images/four-arcs.svg">
897
+
<img src="images/four-arcs.svg" alt="a depiction of four possible arcs given a start and end point">
898
898
<figcaption>
899
899
A depiction of the two possible ellipses,
900
900
and four possible arcs,
@@ -924,7 +924,7 @@ While the ''polygon()'' shape is also responsive, it only support simple rounded
924
924
925
925
To demonstrate, let's start with a speech bubble, such as the following:
926
926
927
-
<img src="images/bubble.svg" width=300 style="background: unset">
927
+
<img src="images/bubble.svg" width=300 style="background: unset" alt="A speech bubble shape">
928
928
929
929
Using this shape with a ''clip-path'' can be done by using the ''path()'' function:
930
930
@@ -934,7 +934,7 @@ Using this shape with a ''clip-path'' can be done by using the ''path()'' functi
934
934
935
935
Altohugh this path can easily scale, the scaled results are not always desirable. e.g. when scaled to a small balloon, the arrow and corners are scaled to become almost invisible:
936
936
937
-
<img src="images/bubble.svg" width=100 style="background: unset">
937
+
<img src="images/bubble.svg" width=100 style="background: unset" alt="scled-down speech bubble shape">
938
938
939
939
To construct this shape using the ''shape()'' function, let's start by turning all the pixel values from the ''path'' function to percentages.
940
940
Note that the ''shape()'' function begins with <css>from</css>:
@@ -974,7 +974,7 @@ specifically the ones the control the curves and arrows:
974
974
975
975
When applied as ''clip-path'', it would looks like the following:
976
976
<p>
977
-
<img src="images/bubble-50.svg" width=150 style="background: unset">
977
+
<img src="images/bubble-50.svg" width=150 style="background: unset" alt="A speech bubble shape, using clip-path">
978
978
</p>
979
979
980
980
The whole speech bubble is scaled to the reference box, while the curves and arrows stay more constant.
@@ -1026,8 +1026,6 @@ we can make the arrow and radius parametric:
0 commit comments