Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@financial-times/o-quote

Package Overview
Dependencies
Maintainers
18
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@financial-times/o-quote

Styling for quotes

  • 4.1.6
  • npm
  • Socket score

Version published
Weekly downloads
356
decreased by-54.48%
Maintainers
18
Weekly downloads
 
Created
Source

o-quote MIT licensed

Styling for quotes

Usage

Check out how to include Origami components in your project to get started with o-quote.

Markup

A block quote is a passage of text from another source, or a passage of text that’s been spoken by a person. Used to attribute another source of information, or to quote the spoken words of a person.

For a standard blockquote style use classes o-quote o-quote--standard and the following markup. We recommend the editorial style instead for editorial contexts such as within articles.

<blockquote class="o-quote o-quote--standard">
	<p>
		The prize for this century’s worst technology product probably belongs to Google Glass, a pair of spectacles with an inbuilt camera and a tiny lens on which you could browse the internet. Suddenly you could film everybody you met, or silently ignore them and read Wikipedia.
	</p>
	<cite class="o-quote__cite">
		<span class="o-quote__author">Henry Mance</span>
		<span class="o-quote__source">Financial Times</span>
	</cite>
</blockquote>

For an editorial style blockquote swap the o-quote--standard class for o-quote--editorial. The editorial variant inherits font size and colour to support multiple editorial contexts. For example at the time of writing live blogs and article pages have different font sizes on large viewports but both should share the editorial quote style. Therefore the editorial quote must be within an element that sets typography styles such as o-editorial-typography-body.

-<blockquote class="o-quote o-quote--standard">
+<blockquote class="o-quote o-quote--editorial">
	<p>
		The prize for this century’s worst technology product probably belongs to Google Glass, a pair of spectacles with an inbuilt camera and a tiny lens on which you could browse the internet. Suddenly you could film everybody you met, or silently ignore them and read Wikipedia.
	</p>
	<cite class="o-quote__cite">
		<span class="o-quote__author">Henry Mance</span>
		<span class="o-quote__source">Financial Times</span>
	</cite>
</blockquote>

Sass

To output all o-quote styles include the oQuote mixin.

@import 'o-quote/main';
@include oQuote();

Pass an options $opts map to include only the o-quote styles you need. For example o-quote has styles for standard and editorial blockquotes. To only include styles for the editorial blockquote:

@include oQuote($opts: (
	'standard': false, // do not output .o-quote--standard variant styles
	'editorial': true, // output .o-quote--editorial variant styles
	'cite': true // output .o-quote__cite styles, to support citations
));

The "editorial" option is only available to master brand users.

You may also use o-quote mixins with custom HTML markup. For example if your markup used my-blockquote as a classname. We do not recommend this approach unless you are unable to update your markup, as it may lead to unnecessary CSS output and more difficult migrations.

<blockquote class="my-blockquote">
	<p>The quote.</p>
	<cite class="my-blockquote__cite">
		<span class="my-blockquote__author">Author</span>
		<span class="my-blockquote__source">Source</span>
	</cite>
</blockquote>
.my-blockquote {
	@include oQuoteEditorial();
}

.my-blockquote .my-blockquote__cite {
	@include oQuoteEditorialCite();
}

.my-blockquote .my-blockquote__author {
	@include oQuoteEditorialCiteAuthor();
}

.my-blockquote .my-blockquote__source {
	@include oQuoteEditorialCiteSource();
}

The oQuoteEditorial mixins shown here are only available to master brand users. For a full list of o-quote mixins see o-quote SassDoc in the registry.

Migration Guide

StateMajor VersionLast Minor ReleaseMigration guide
✨ active4N/Amigrate to v4
╳ broken33.0migrate to v3
⚠ maintained22.2migrate to v2
╳ deprecated11.3N/A

Contact

If you have any questions or comments about this component, or need help using it, please either raise an issue, visit #origami-support or email Origami Support.

Licence

This software is published under the MIT licence.

Keywords

FAQs

Package last updated on 07 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc