Git Product home page Git Product logo

new.css's People

Contributors

3x avatar alexislefebvre avatar anth12 avatar bmcculley avatar caillou avatar cbhp avatar coil avatar frankdilo avatar ln-north avatar takios avatar thomasandrewmaclean avatar

Stargazers

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

Watchers

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

new.css's Issues

Add `ui-monospace` to the `--nc-font-mono` stack

Making an Issue first since I'd like to bikeshed gather opinions on where in the stack to put it.

As of this writing, the --nc-font-mono stack is this:

--nc-font-mono: Consolas, monaco, 'Ubuntu Mono', 'Liberation Mono', 'Courier New', Courier, monospace;

I tried viewing this on my iPad, and I got Courier (New?). Since the rest of new.css uses nice, modern sans-serif fonts, it stuck out like a sore thumb.

Happily, changing the font stack to

    --nc-font-mono: ui-monospace, Consolas, Monaco, "Ubuntu Mono",  "Liberation Mono", "Courier New", Courier, monospace;

made it so I got .AppleSystemUIFontMonospaced (SF Mono). This looks way better on my iPad.

I suggest putting ui-monospace right before Monaco, so the line reads:

	--nc-font-mono: Consolas, ui-monospace, Monaco, 'Ubuntu Mono', 'Liberation Mono', 'Courier New', Courier, monospace;

My rationale:

  1. Monaco is a Mac OS/OS X/macOS-only font.
  2. Monaco has only one weight and one style: Normal. No bold, no italic, no bold italic. As much as I like Monaco as a typeface, it's not a good font.
  3. The last version of Safari to support only Monaco and not ui-monospace was superseded in March of 2020.
  4. Chrome and Firefox on macOS will still pick up Monaco, which is still better than any Courier font in most cases.

Thoughts?

(Also, I'd properly capitalize Monaco in passing, but that's much less important.)

<footer> Element

To complement the <header> you can create, why not add some basic styling for a <footer> that must be at the bottom of the body, which makes a slightly darker footer that sticks to the bottom of the window? A sticky footer is one of those boilerplate bits of code that would be nice to have if a header is already there. It should have identical styling to the header.

Fails Lighthouse's "color contrast" accessibility audit (Background and foreground colors do not have a sufficient contrast ratio)

Problem

You can easily reproduce this by running Lighthouse against the demo page @ https://newcss.net/.

In the report, under Accessibility -> Contrast, you will see this message:

Background and foreground colors do not have a sufficient contrast ratio.
Low-contrast text is difficult or impossible for many users to read. Learn more.

"Learn more" links to https://web.dev/color-contrast/

Below that we see a list of the failing elements. They are all the <a> elements within the <header> element.

So the color for <a> elements is fine against the body background color, but not dark enough against the header background.

Workaround

To fix this locally in my project, I override this new.css css rule:

a {
    color: var(--nc-lk-1);
}

with this custom css rule:

a {
    color: var(--nc-lk-2);
}

But I think this makes it less pretty.

Suggested solution

Unfortunately, I'm not really sure what a good solution would be, since I'm not much of a designer, but I thought I would bring up the issue at least.

Off-topic comments

Thanks for the sweet css framework! I'm really enjoying it! <3

Link for adding the stylesheet is not here

Thanks for creating and sharing new.cs!

There's a issue on https://newcss.net/usage. The code that you're supposed to copy to add new.css to your website is invisible. Here's what it looks like in Chrome:

toto

By inspecting the page, I saw that the two links are not quoted text, which the HTML in 1. is, and I think it might be the issue.

Font-Size: 1.03rem

The body has a confusing font-size of 1.03rem.

Given that most browsers have a base font-size of 16px, we end up with a font-size of 16.43px. This seems like an odd choice, especially on normal-density screens.

What is the rational behind this value?
If this has a reason, could you add a comment?

Add a sidebar

Would it be out of the scope of this project to add a sidebar?

It may be fixed on the left, to always show navigation between pages.

Add NPM package

Hello,

I like this classless CSS framework a lot! Any plans about publishing it on NPM? In this way devs might use more standard ways to add this CSS to their workflow

Different font for headings?

I assume it'll be easy enough to tweak - simply add a new variable.

Would you like a pull request, or is this not something you are interested in?

newcss.net appears broken

Is the site/nav supposed to look like this?

Screenshot 2020-05-18 at 15 07 54

At the very least there's an error with header's margin:

Screenshot 2020-05-18 at 15 09 50


Chrome/81.0.4044.138 (Macintosh; Intel Mac OS X 10_15_3)

Calendar icon in date input is barely visible (dark mode)

Description

When the web browser is in "dark" mode, the calendar icon on the right side of the date input is barely visible, as shown here:

image

The issue is not present when the web browser is in "light" mode, as shown here:

image

To reproduce

  1. Configure your computer so that apps use their "dark" mode by default.

    image

  2. Use a web browser to visit the official new.css demo site: https://newcss.net/demo/

  3. Use the web browser's Developer Tools to edit an existing <input ... /> element so its type attribute has a value of date. For example:

    - <input type="email" name="email" required="">
    + <input type="date" name="email" required="">

    image

  4. See that the calendar icon in the date input field is barely visible.


Environment information:

  • OS: Windows 10
  • Browser: Brave Version 1.36.116 Chromium: 99.0.4844.74 (Official Build) (64-bit)

Based upon what I see in the demo site's HTML source code (excerpt shown below), I think it is using new.css version 1.1.2:

<head>
    <!-- ... -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/fonts/inter.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@exampledev/[email protected]/new.min.css">
</head>

Padding issues for <input type="range"

By default, all input elements have a 12px left-right padding:

textarea,
select,
input {
	padding: 6px 12px;
	...
}

For an <input type="range" ... this causes an issue (at least in Chrome 83) with incorrectly rendering the input:

Min value:
image

Mid value:
image

Max value:
image

Without the left-right padding, the input is rendered correctly.

Default form styles in mobile browsers

I wanted to make an open discussion about if default browser styles should be integrated/used to reduce the amount of CSS or giving more focus on setting the styles for each browser the same.

  1. Adding appearance: none to all form elements and updates the styles for each property e.g. border, box-shadow, outline, etc. Therefore the elements could be customized even more.
  2. Just adding missing properties to override browser defaults

Screenshot from iPhone in Safari
IMG_1364

new.css#L41

Hi, in new.css#L41
maybe you should replace this:

  • | --nc-ac-tx: var(--nc--dac-tx);
    with this:
  • | --nc-ac-tx: var(--nc-d-ac-tx);

new.css#L39
this:

  • | --nc-lk-tx: var(--nc--dlk-tx);
    with this:
  • | --nc-ac-tx: var(--nc-d-lk-tx);

Hard to distinguish form fields

I almost didnโ€™t notice the form fields in the demo. When the form fields are not focussed in the browser they have no outline/border and are only distinguished from the website by their background colour. But the element background colour is extremely close to the page background colour.

Mode Page Background Element Background Contrast Ratio
Dark #000000 #111111 1.11
Light #FFFFFF #F6F8FA 1.06

There should be some form of form element indication in place at a higher contrast. Possibly just the border around it.

Accent Color

accent-color property is still not fully supported, but this will be pretty neat feature. It will change background color of checkboxes and radios to the theme color.

Read more on mdn

Can I use

Pre-made themes are not working at the moment

Night and Terminal themes are currently not working, or at least they don't work for me, what I did was pasting <link rel="stylesheet" href="https://newcss.net/theme/night.css"> inside <head>,
default theme does work though

need a grid

Grids are Great components in web.
New.css needs a grid.
but grid needs classes. We need to add some classes for grid.

Grid is based on 4 css techniques.

  • css tables
  • css floats
  • css flex
  • css grid

Can I make a PR

sidebar

What would be the right way to add a sidebar to this? I find this css refreshing and clean for docs, but docs should have a sidebar.

I think

could be used? But then I wonder how to work with the grid layout to add this.

Support <abbr> and <acronym>

I suggest to highlight these tags.

Bootstrap 3 used this style to add a cursor and a bottom border:

abbr[title] {
    cursor: help;
    border-bottom: 1px dotted #999999;
}

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.