Code Monkey home page Code Monkey logo

cf-core's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cf-core's Issues

Set up self-hosted webfonts

The code provided for using our webfont provider's CDN is not cutting it. We need to set up our fonts to be self-hosted. It's essentially a three-step process:

  • Upload font files to a location on one of our servers
  • Get access controls in place (to ensure fonts can only be accessed from approved hostnames)
  • Update the @font-face code in this repo to refer to the new locations.

And then projects will need to update their version of cf-core to use the new self-hosted fonts.

/cc @poorgeek

Make webfont easier to change for non-CFPB use cases

Currently non-CFPB projects have to deal with ripping out Avenir. We should make it easier to replace it by creating variables.

How does the following look to you all?

cf-vars.less

...
@webfont_declarations: "/static/css/licensed-fonts.css";
@webfont_regular: "'AvenirNextLTW01-Regular', Arial, sans-serif"
// Then vars for each version of Avenir.
...

cf-base.less

...
.webfont-regular() {
    font-family: @{webfont_regular};
    font-style: normal;
    font-weight: normal;

    & em,
    & i {
        .webfont-italic();
    }

    & strong,
    & b {
        .webfont-demi();
    }
}
// Then one for each version of Avenir.
...

cf-core.less

...
@import "@{webfont_declarations}";
...

So by default a CFPB project shouldn't have to do anything different. Projects that want to use other font families can point to their own file containing their own @font-face rules. They'd do it like this:

main.less

@import "cf.less"; // Assume that this is a concatenated version of Capital Framework
@webfont_declarations: "/static/css/my-own-font-face-rules.css";
@webfont_regular: "'MyFontFamilyNameForRegular', sans-serif";
// Etc...

CC: @ascott1

Align CF Readmes with OS project template

Move CF projects toward using a Readme more in-line with https://github.com/cfpb/open-source-project-template. Of particular note:

  • Include the LICENSE (or exclude the link from the Readme). See https://github.com/cfpb/cf-typography/issues/31.
  • Include installation instructions for generating the docs. E.g. Run npm install, grunt vendor, and grunt and open the HTML page in /docs/ in a web browser (also may be worth noting a server doesn't need to be running).
  • Consider captioning the screenshot. The screenshot may be self-explanatory in some cases, but other times it may not be clear what's shown. For example, the cf-typography repo has a paragraph of text that turns into an image of lorem ipsum without any explanation of what the reader is looking at:

screen shot 2015-03-19 at 2 41 10 pm

Without prior familiarity with the output of the project docs, it's not clear what this image is showing.

Should we change the base font family to Avenir?

Seems like almost everything is in Avenir except longer blocks of text. It might make things easier on the front end if we just used that as the default font family instead of Georgia. Any thoughts?

Document comment restrictions inside .respond-to mixins

TIL that you cannot use traditional CSS /* ... */ comments inside the statement block of our .respond-to mixins. Less will not compile, giving the following error:

>> ParseError: unmatched `/*`

Additionally, you cannot comment out a single, unmatched curly brace inside the .respond-to statement block. Less will get to the end of the document and think that there is an unmatched curly brace missing its partner.

These quirks should be documented alongside the .respond-to mixins.

Adds font-smoothing?

Avenir seems to look better with font-smoothing: antialiased;. Note that in Chrome you need -webkit-font-smoothing: antialiased;. Any reason we shouldn't add this?

Include classes for table element display aliases

In some cases it's valuable to use display: table-* properties to build a table, for example:

  • As a fallback for flexbox.
  • To allow a table row to be a link.
  • To use table-like layout in places where a table isn't semantically correct.

Can cf-core provide utility class mappings for table element --> table display property?
Like:

.u-table { display: table; }
.u-table-caption { display: table-caption; }
.u-colgroup { display: table-column-group; }
.u-thead { display: table-header-group; }
.u-tfoot { display: table-footer-group; }
.u-tbody { display: table-row-group; }
.u-col { display: table-column; }
.u-tr { display: table-row; }
.u-td, .u-th { display: table-cell; }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.