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

Default attribute styles #18

Closed
riwos opened this issue Apr 15, 2018 · 3 comments
Closed

Default attribute styles #18

riwos opened this issue Apr 15, 2018 · 3 comments

Comments

@riwos
Copy link

riwos commented Apr 15, 2018

Hi,

I think you can extend your awesome directive regard styles. You've defined default styles like this:

this.defaultStyles = {
'position': 'fixed',
'top': '50%',
'bottom': '50%',
'right': '0',
'width': '35px',
'height': '35px',
'line-height': '35px',
'text-decoration': 'none',
'color': 'white',
'background': 'rgba(0, 0, 0, 0.3)',
'border': 'none',
'border-radius': '3px 0 0 3px'
};

In my case I do not need your default styles. I think that should be optional.
That would be great if you can implement the following three cases

  1. If you do not define any styles the attribute style should not be rendered on html tag.
  2. That option will be the best for me. If I can put names of classes from css in current button attribute i.e: [styles]={ 'classA classB classC' }
  3. The style configuration that works as standard functionality now.

What do you think ?? This is only my proposal ;)

@annapogorelova
Copy link
Owner

@riwos Thank you for your feedback. You are right about the default styles being a bit redundant. I will think about making the syntax a bit more flexible and maybe release the new functionality in the next major version of the directive (v5.0.0).

@annapogorelova
Copy link
Owner

Hi @riwos . I'm sorry for being so late with this feature, but it is available now in v4.2.1.

@riwos
Copy link
Author

riwos commented May 16, 2018

Thanks a lot :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants