Skip to content

clip-path support added - #2102

Merged
enchev merged 1 commit into
masterfrom
clip-path
May 16, 2016
Merged

enchev merged 1 commit into
masterfrom
clip-path

Conversation

@enchev

@enchev enchev commented May 13, 2016

Copy link
Copy Markdown
Contributor

Support for clip-path CSS property. Supported shapes are circle, ellipse, rect and polygon for now however we can add more. You can define your path visually using tools like: http://bennettfeely.com/clippy/

Example

<Page>
    <GridLayout rows="*,*,*,*,*">
        <Button text="circle" style="background-color: red; border-width:2; border-color: blue; clip-path: circle(100% at 50% 50%);"/>
        <Button text="ellipse" style="background-color: orange; border-width:2; border-color: green; clip-path: ellipse(50% 50% at 50% 50%);" row="1" />
        <Button text="rect" style="background-color: red; border-width:2; border-color: blue; clip-path: rect(0, 0, 100%, 100%);" row="2" />
        <Button text="polygon" style="background-color: magenta; border-width:2; border-color: red; clip-path: polygon(20% 0%, 0% 20%, 30% 50%, 0% 80%, 20% 100%, 50% 70%, 80% 100%, 100% 80%, 70% 50%, 100% 20%, 80% 0%, 50% 30%);" row="3" />
        <Button text="image polygon" style="background-image: url('https://media-cdn.tripadvisor.com/media/photo-s/03/9b/2f/ce/maldives.jpg'); border-width:2; border-color: red; clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);" row="4" />
    </GridLayout>
</Page>

Result

ios
android

@ns-bot ns-bot added cla: yes and removed cla: no labels May 13, 2016
@enchev
enchev force-pushed the clip-path branch 3 times, most recently from 3194cb0 to 75f48e9 Compare May 13, 2016 14:19
@tzraikov

Copy link
Copy Markdown
Contributor

👍

@enchev
enchev merged commit b8785af into master May 16, 2016
@enchev enchev added this to the 2.0.1 milestone May 18, 2016
@enchev enchev self-assigned this May 18, 2016
@lock

lock Bot commented Aug 28, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked and limited conversation to collaborators Aug 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants