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

Indent #5964

Closed
devgraph opened this issue Apr 3, 2018 · 2 comments
Closed

Indent #5964

devgraph opened this issue Apr 3, 2018 · 2 comments

Comments

@devgraph
Copy link

devgraph commented Apr 3, 2018

I am a writer and seat of the pants website developer. I just want to put in two cents as a writer. If there is any way you can include and indent of .25 or.5 for the first line of a paragraph you will have achieved a major breakthrough for writers. I have been searching for software which allows me to write short stories or chapters on the web for years. As yet, all I can use is Scrivener or Word and they aren't pasted with the indents in any software. This is probably not the place to write this and I'll take my answer off the air but please consider this in some way for the future.

@ZebulanStanphill
Copy link
Member

Disclaimer: I am not a WordPress/Gutenberg developer.

Assuming you want an indent for all paragraphs, this could probably be done with a theme that uses the text-indent CSS property on paragraphs on both the front-end and Gutenberg editor. (Themes are supposed to be able to change how things look in Gutenberg to provide a more WYSIWYG experience.)

Actually, you could do this (for the front-end, at least) with just the Additional CSS feature in the WordPress Customizer. Just add something like this:

p {
text-indent: 1em
}

If you want the indent to only be applied to specific paragraphs, you could use CSS classes. All Gutenberg blocks have a setting in the block inspector/advanced settings to add CSS classes to a particular instance of a block. Then you would just have to add something like the following CSS to the Custom CSS setting in the WordPress Customizer:

.indented-first-line {
text-indent: 1em
}

A plugin could also be made that modifies the core Paragraph block to have a setting to enable/disable indents on the first line of a particular paragraph, and if desired, change the indent width. This setting could also be implemented in core WordPress, but I doubt that would happen since I can not see the feature being used very much at all, and core WordPress (in my opinion) is supposed to only include a solid core that can be extended, not a kitchen sink of every option by default.

You could also theoretically use a plugin that adds a "Story Paragraph" (or whatever name fits) block that is basically identical to the core Paragraph block but with an indent on the first line, but that solution would probably be overkill, though perhaps quite useful if there are any additional default styles or features you would want for "story paragraphs" that you did not want for regular/core paragraphs.

@danielbachhuber
Copy link
Member

Thanks for the feedback! We'll keep this in mind for future UX iterations.

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

3 participants