Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple values for background-clip #2441

Closed
stalniy opened this issue Jun 20, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@stalniy
Copy link
Contributor

commented Jun 20, 2019

Issue type
Feature request

Description of new feature

Allow to specify multiple values for background-clip property, so some background images will be clipped and others not

Motivation for new feature

I want to render an background image outside the node. Documentation says that I need to disable background-clip but this doesn't work my case, well partially.

What I want is to specify multiple background images, clip the first image but DON'T clip the 2nd

Additional

I already tried to do this and it works, requires simple changes in 2 places:

So, if you approve, I will send PR.

@maxkfranz

This comment has been minimized.

Copy link
Member

commented Jun 20, 2019

So, if you approve, I will send PR.

OK, as long as it doesn't break compatibility. I think multiple: true properties allow a single value to be used as an implicit array of length 1, so it should probably be OK.

@maxkfranz

This comment has been minimized.

Copy link
Member

commented Jun 20, 2019

You can check how other bg image properties are used. I think it may be if only one value is specified, then the same value is used for all.

@stalniy

This comment has been minimized.

Copy link
Contributor Author

commented Jun 20, 2019

Done.

Adding an example of how this looks, so it's easier to understand the purpose. I have a regular image which is requested by HTTP (background-clip is applied to it) and svg image (black circle) which is base64 encoded (background-clip is not applied to it):

example

@maxkfranz maxkfranz added this to the 3.8.0 milestone Jun 20, 2019

stalniy added a commit to stalniy/cytoscape.js that referenced this issue Jun 21, 2019

stalniy added a commit to stalniy/cytoscape.js that referenced this issue Jun 21, 2019

maxkfranz added a commit that referenced this issue Jun 24, 2019

Add `background-clip` description under the array/multiple props list.
This puts it with other similar properties and makes additional explanation unneeded.

Ref : #2443 #2441

@maxkfranz maxkfranz closed this Jun 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.