[WIP][TCE]Lietuvos#646
Closed
astronaut-wannabe wants to merge 8 commits intomasterfrom
Closed
Conversation
b6fef8a to
5c4b64c
Compare
23 tasks
Why?
------------------------
The last part of creating a turnkey solution for generating TCEs in
additional languages is creating CSS for every new language. One of
the things that make this difficult for someone who isn't familiar
with the codebase is that all of the CSS is together, and you don't
know what and where to look for doing the customizations.
What?
------------------------
This creates the following structure:
```sh
website/app/assets/stylesheets/to_change_everything
.
├── _common.scss
├── _english.scss
├── _espanol.scss
├── _farsi.scss
├── _한국어.scss
├── common
│ ├── _font_styling.scss
│ ├── _navigation.scss
│ └── _reset.scss
├── farsi
│ └── _font_overrides.scss
└── korean
└── _font_overrides.scss
```
The top-level files (e.g. `_farsi.scss`) are automatically
generated. So are the
sub-files (e.g. `farsi/_font_overrides.scss`). These are also
automatically wired up and filled in with the same CSS as
`font_styling.scss`.
A person generating a new TCE version then only has to look at 1
file (`farsi/_font_overrides.scss` in this example) and will only
really need to delete any CSS that will be unchanged from the common
styles and adjust some input values in the `scss` functions.
Results
------------------------
Using this convention the custom css needed for the farsi or korean
versions of TCE has been reduced to 50-60 lines of cookie-cutter CSS.
note
------------------------
I do hope to do a similar thing to the layout code (margins, paddings,
etc.) so that there will be a structure like this:
```sh
├── farsi
│ └── _font_overrides.scss
│ └── _layout_overrides.scss
```
- multi-line CSS rules have `}` on new line - Remove font-stack 1-liners - add spaces after `:` in media queries
5c4b64c to
798033a
Compare
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TODOs
Translations done with google translate
demo: https://crimethinc-staging-pr-646.herokuapp.com/tce/lietuvos