npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@financial-times/o-quote

v5.3.4

Published

Styling for blockquotes, pull-quotes and any other types of quote

Downloads

3,844

Readme

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 '@financial-times/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 core 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 core brand users. For a full list of o-quote mixins see o-quote SassDoc in the registry.

Migration Guide

State | Major Version | Last Minor Release | Migration guide | :---: | :---: | :---: | :---: ✨ active | 5 | N/A | migrate to v5 | ⚠ maintained | 4 | 4.1 | migrate to v4 | ╳ broken | 3 | 3.0 | migrate to v3 | ╳ deprecated | 2 | 2.2 | migrate to v2 | ╳ deprecated | 1 | 1.3 | N/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.