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

When using a StyleGroup, the ParagraphStyles are not inherited from the base style. #126

Open
CraigSiemens opened this issue Nov 17, 2020 · 0 comments

Comments

@CraigSiemens
Copy link

Normally a style from the base style is inherited if a nested style doesn't override it. It seems like every field in NSParagraphStyle is overridden if one field is set on the paragraph style.

let baseStyle = Style {
    $0.lineHeightMultiple = 0.9
})

let headerStyle = Style {
    $0.paragraphSpacingAfter = 16
})

let style = StyleGroup(base: baseStyle, ["header": headerStyle])

This will cause the header text to no longer have the custom lineHeightMultiple applied to it.

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

1 participant