-
Notifications
You must be signed in to change notification settings - Fork 9
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
Create Organisation logo component #754
Merged
Merged
Conversation
This file contains 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
`bundle exec rails generate govuk_component organisation-logo`
* Port from `_organisations.scss` * Separate logo wrapper from container * Apply brand class to component wrapper so all child elements can be styled accordingly * Use the new frontend toolkit list of colours to set border colour * Allow logos with and without links * If a crest is needed it needs to be passed in explicitly * The organisation name should be pre-formatted
* Use the images provided by frontend toolkit * Make use of the retina versions * Port the crest mixin from _organisations.scss and add the retina versions, using the image dimensions to set background size correctly * Use `<span>` to push the text down so its baseline lines up with the coloured border
No logo has a coloured/branded border without a crest.
These logos have a crest but no border. In Whitehall they get given a cabinet-office branding, which sets a colour that’s ignored. Instead of using an ignored colour, use the `brand` to indicate what should happen.
No current organisation is using it.
* Use 35px rather than 38px, as per Whitehall * Only apply this padding on tablet and above, on mobile the 25px padding works for all crests, this also matches Whitehall
* Coerce logos to have matching heights. The crest images are all slightly different sizes. Allow the width to vary, but alter the background size so that they are either 25px or 35px, as per Whitehall. This eliminates the need for the more complex crest mixin that needs background sizes. * Tweak the mobile padding to match Whitehall - crests are 20px tall, expanding to 25px on tablets, tall crests start at 25px and expand to 35px.
boffbowsh
force-pushed
the
organisation-logo-component
branch
from
March 4, 2016 11:51
66973d2
to
500d2fa
Compare
boffbowsh
changed the title
[DO NOT MERGE] Create Organisation logo component
Create Organisation logo component
Mar 4, 2016
boffbowsh
added a commit
that referenced
this pull request
Mar 4, 2016
Create Organisation logo component
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.
Create a component for "medium sized" "stacked" logos, ie those used on HTML publications.
To help with building this I created a quick page in Whitehall to render all the medium stacked logos for every organisation:
https://github.com/alphagov/whitehall/compare/org-logos
Tests will fail until alphagov/govuk_frontend_toolkit#262 has been merged and this can be version bumped.
Example usage: