Skip to content
This repository has been archived by the owner on Apr 11, 2020. It is now read-only.

Adjustable Custom Layout Font SIzes #9

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

owengalenjones
Copy link

Hello,

One thing that's bothered me for a long time about Blueprint was the tiny default font-size (12!) which I would always manually increase. This allows font-size to be set in the settings.yml file which then propagates to typography.css AND adjusts the baseline height used to create the grid.png (baseline_height = font_size * 1.5)

This can be easily set in settings.yml by
custom_layout:
font_size: 16

Thanks

owengalenjones and others added 11 commits April 7, 2011 13:53
If compressor.rb sees custom layout and the css_source_file is typography.css it runs: custom_layout.generate_typography_css

Modified the compressor output
define font_size to return as a float or Blueprint default (12)

defined generate_typography_css using the same syntax as generate_grid_css
Only change is to set the (font_size / 16) * 100
12 / 16 * 100 = 75
…cally computed from passing in font_size or from the Blueprint default (12)

Baseline is font size * 1.5
Deleting debug.zip

Merging updates from Eric Meyer's latest reset.css

Adding explicit font color to input & textarea

Added constant FONT_SIZE defaults to blueprint standard of 12

Added symbol :font_size

If compressor.rb sees custom layout and the css_source_file is typography.css it runs: custom_layout.generate_typography_css

Modified the compressor output

Added attr_writer :font_size

define font_size to return as a float or Blueprint default (12)

defined generate_typography_css using the same syntax as generate_grid_css

Initial commit, erb file of typography

Only change is to set the (font_size / 16) * 100
12 / 16 * 100 = 75

Adjusts height based on either passing in a baseline_height, automatically computed from passing in font_size or from the Blueprint default (12)

Baseline is font size * 1.5

Baseline will always be 1.5 * font_size

Added setting font_size example

adjusted hr margin based on baseline (1.5 * font_size) - 1 (hr height)

hr margins are to_i
…/blueprint-css

Conflicts:
	lib/blueprint/blueprint.rb
	lib/blueprint/compressor.rb
	lib/blueprint/custom_layout.rb
	lib/blueprint/grid_builder.rb
	lib/blueprint/typography.css.erb
@owengalenjones
Copy link
Author

Josh mentioned that the custom font_size can break some form elements. Looking into fixing it now.

I just checked the default form.css in the test pages and they already appear broken to me.

http://d.pr/N5Eo

…ght (1.2em, strong) the bottom margin on <h4> appears to be 6px above the baseline while the <legend> is 4px below it. [Image taken on Chrome at maximum zoom]

The one thing that <legend> appeared to be missing was a line-height, so I added <h4>'s line-height of 1.25em.  This appears to me to be centered from 12px font-size all the way up to 100px font-size.
@sdevore
Copy link

sdevore commented Mar 8, 2012

Boy I would love to see this get pulled in

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

Successfully merging this pull request may close these issues.

2 participants