GithubHelp home page GithubHelp logo

Comments (7)

progers avatar progers commented on August 30, 2024

What about just supporting the border-radius property?

from svgwg.

BigBadaboom avatar BigBadaboom commented on August 30, 2024

I considered that, but thought that:

  1. it's not really a border and might be confusing

  2. what happens if someone does this?:

    rect {
       rx: 10;
       border-radius: 15;
    }
    

from svgwg.

tabatkins avatar tabatkins commented on August 30, 2024

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.

AmeliaBR avatar AmeliaBR commented on August 30, 2024

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.

jarek-foksa avatar jarek-foksa commented on August 30, 2024

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.

progers avatar progers commented on August 30, 2024

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.

karip avatar karip commented on August 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.