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

Make list of content elements customizable #12

Open
tcharlss opened this issue Jun 14, 2019 · 3 comments
Open

Make list of content elements customizable #12

tcharlss opened this issue Jun 14, 2019 · 3 comments

Comments

@tcharlss
Copy link

Hi,

When using the @include content mixin, it would be nice to be able to customize the list of elements.
By default it's just p, ol, ul, pre, but usually I need more : dl, figure, etc.
So I end up doing it by hand instead of using that mixin.

Maybe there could be a second parameter to the mixin, or another property in the $shevy-defaults variable ?

@kyleshevlin
Copy link
Owner

Hi @tcharlss, not a bad idea, but it's been a few years since I've looked at or used this code. If you have any interest in making a PR for this feature, that would be great, otherwise I may get to it, but I can't guarantee any time line.

@tcharlss
Copy link
Author

Sure, I can make a PR.
Do you have any preference regarding the implementation ?
I'm thinking of adding a content-elements property to $shevy-defaults, like so :

$shevy-defaults: (
  base-font-size: 1em,
  base-line-height: 1.5,
  base-font-scale: (3, 2.5, 2, 1.5, 1.25, 1),
  margin-bottom: true,
  proximity: false,
  proximity-factor: .85,
  content-elements: (p, ol, ul, pre)
);

That way it should be easily customizable.

@kyleshevlin
Copy link
Owner

There are two ways to solve this. You can make a list and generate it that way. Another way could be to expose the styles as a mixin itself, that way you can just @include it in a list of elements you define in your Sass.

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

No branches or pull requests

2 participants