Comments (7)
What about just supporting the border-radius property?
from svgwg.
I considered that, but thought that:
-
it's not really a border and might be confusing
-
what happens if someone does this?:
rect { rx: 10; border-radius: 15; }
from svgwg.
Stroke does map to border, whenever we have to mix CSS and SVG box model terms.
Ugh, I was going to suggest we can address the collision by making rx/ry just be shorthands for the border-radius properties, but we don't currently break those properties apart far enough - we just have the four corners, each of which accepts two values for the x and y. To do the shorthanding we'd need a property for just the x part of a corner.
(We could try and add this, of course.)
from svgwg.
My instinct is to say keep them separate. Strokes are not borders, none of the other border properties apply. They wouldn't make sense if they did, because borders have separate top/right/bottom/left values, but those options don't make sense for non-rectangular shapes.
That said:
If we adopt a syntax for declaring path geometry that uses CSS shapes functions in general (as opposed to only allowing the path()
function), then the inset()
function allows you to describe a rectangle with customizable curved corners using the border-radius notation.
from svgwg.
I also don't like the idea of calling it "border-radius".
The term stroke is clearly defined and used consistently all over the place in the SVG spec, there is e.g. stroke-miterlimit
, paint-order: stroke
, vector-effect: non-scaling-stroke
, isPointInStroke()
, getBBox({stroke: true})
, etc.
Being only partially consistent with HTML here would be in my opinion more confusing than not being consistent at all.
from svgwg.
These are all great points and I now agree that border-radius is just a bad idea.. apologies for the tangent. Reusing the syntax but under a different name makes sense to me.
from svgwg.
There has been some discussion about this kind of feature in the past [1]. The idea was to extend 'rx' and 'ry' properties and also to add 'r' property for paths, so that any path corner could be rounded.
Anyway, I give a thumbs up for this feature. :)
[1] https://www.w3.org/2012/09/19-svg-minutes.html#item16
from svgwg.
Related Issues (20)
- No way to construct a TimeEvent, so its initTimeEvent method is fully useless
- The IDL of SVGSVGElement.getElementById does not allow null
- Should SVG's `<image>` element support the `fetchpriority` attribute analogous to HTML's `<img>` element? HOT 1
- Decimal point not allowed according to Path Data ENBF HOT 3
- Enable lazy loading for URLs on use href HOT 1
- Does SVG support Custom elements? HOT 1
- Error about drawto_command in SVG 2.0 path EBNF HOT 2
- What should happen when trying to insert empty strings or separators into SVGStringList
- SVGAElement.prototype.text should be removed HOT 6
- Serialization of transform functions and transform attribute.
- Update UA stylesheet rules to use :any-link instead of :visited or :link HOT 2
- Incorrect description of path horizontal and vertical movement HOT 7
- Publish current status of SVG
- Is the `path()` function allowed for the `d` property? HOT 2
- Can we fix arc interpolation? HOT 4
- Implementing CSS Text Wrapping in SVG HOT 1
- optional
- Arc sweep vs clockwise explanation HOT 1
- incorrect syntax for svg_path in SVG2 draft
- Define path interpolation when relative and absolute segment types are used. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svgwg.