Background image position options instead of center

Open
#297 2 comments 0 reactions 1 assignee View on GitHub

@strausr is already working on this.

Since Dec 20, 2020.

Assessment

This issue has not been assessed yet.

Description

enhancement

Explain your use case

There are many cases where 'center center' is not ideal for background positions as defined in the background image directive. https://github.com/cloudinary/cloudinary_angular/blob/master/projects/angular-cld/src/lib/cloudinary-background-image.directive.ts

Describe the problem you’re trying to solve

A way to provide an override without some css !important hack to control image position.

Do you have a proposed solution?

Input param for background position, defaults to center

@Input('clbackgroundposition') background_position = 'center center'; 
...
this.renderer.setStyle(nativeElement, 'background-position', `${background_position}`);

Dominant language
TypeScript
Stars
303
Forks
224
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudinary/cloudinary_angular

All issues in cloudinary/cloudinary_angular

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.