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

Ability to change angle #9

Closed
visualcookie opened this issue Aug 11, 2016 · 3 comments
Closed

Ability to change angle #9

visualcookie opened this issue Aug 11, 2016 · 3 comments

Comments

@visualcookie
Copy link

Sometimes the designer changes the angle so it's not 10deg but 2 or 3deg.

@josephfusco
Copy link
Owner

Great suggestion. The ability to specify the angle rather than having the user calculate height + width would be a nice addition. Currently working on #8 to allow percentages, which this wouldn't really work with as the angle would change at different screen sizes, but maybe we can do something like

@include angled-edge('outside bottom', 'lower left', #00FF00, 2800, $angle:4deg);

where we specify both width and angle as an optional argument.

@visualcookie
Copy link
Author

That would be amazing. Like that idea. 👍

@josephfusco
Copy link
Owner

josephfusco commented Aug 12, 2016

Thinking this over again, and while I would love to include an angle option as previously discussed, it has proven to be inefficient due to the limitations of sass. Creating the functions needed to calculate this doubles the size of the partial just for one argument.

For the time being, the user can still achieve a specific angle they need by calculating it themselves and passing in the $width & $height options. This will keep compile times down. I will consider this however in the future once when sass can handle more of these functions itself.

For reference, if you need a specific angle for the edge and have the known and width and angle, the equation to get the height would be:

$height = tan($angle) * $width

I hope this helps.

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