Skip to content

Commit

Permalink
Adds deprecation notice. fixes #4 (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
tylergaw committed Jun 6, 2019
1 parent 1d2fc9f commit f90d5ea
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 6 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -2,6 +2,10 @@

# [ColorMe](https://colorme.io) [![Build Status](https://travis-ci.org/tylergaw/colorme.svg)](https://travis-ci.org/tylergaw/colorme)

**NOTE:** the CSS color function here is deprecated. New functions are in
the works. When a spec is available we’ll get this site updated.
See [this Github issue](https://github.com/w3c/csswg-drafts/issues/3187#issuecomment-499126198) for background.

Visualize The CSS [Color Function]((https://drafts.csswg.org/css-color/#modifying-colors)).

## Contributing
Expand Down
2 changes: 1 addition & 1 deletion public/service-worker.js
@@ -1,5 +1,5 @@
/* global clients */
const STATIC_CACHE_NAME = "colorme-v7";
const STATIC_CACHE_NAME = "colorme-v8";
const BASE_STATIC_URLS = [
"/",
"/index.html",
Expand Down
2 changes: 2 additions & 0 deletions src/App.js
Expand Up @@ -12,6 +12,7 @@ import {
import Banner from 'components/Banner';
import Colors from 'components/Colors';
import Controls from 'components/Controls';
import DeprecationNotice from 'components/DeprecationNotice';

class App extends Component {
constructor(props) {
Expand Down Expand Up @@ -264,6 +265,7 @@ class App extends Component {
return (
<main>
<Banner />
<DeprecationNotice />
<Colors {...colorsProps} />
<Controls {...controlsProps} />
</main>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Banner/Banner.js
Expand Up @@ -10,7 +10,7 @@ class Banner extends Component {
ColorMe
</h1>
<p className='bannerIntro'>
Visualize The CSS Color Function.
Visualize The CSS Color Function<b>*</b>.
{' '}Made by <a href='https://tylergaw.com/articles/introducing-colorme' target='_blank' rel='noopener'>Tyler Gaw</a>.
{' '}Code on <a href='https://github.com/tylergaw/colorme' target='_blank' rel='noopener'>GitHub</a>.
{' '}Inspired by <a href='http://jim-nielsen.com/sassme/' target='_blank' rel='noopener'>SassMe</a>.
Expand Down
6 changes: 5 additions & 1 deletion src/components/Controls/Controls.css
Expand Up @@ -12,6 +12,10 @@
padding: 0.75rem 0 0 0;
}

.controlsHeading.deprecated {
color: #c6c6c6;
}

.colorFunc {
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
margin: 0 1rem;
Expand All @@ -20,7 +24,7 @@
.colorFuncInput {
border: 0;
box-sizing: border-box;
color: #252525;
color: #c6c6c6;
font-size: 1.2rem;
margin: 1rem 0 0.7rem 0;
padding: 0;
Expand Down
6 changes: 3 additions & 3 deletions src/components/Controls/Controls.js
Expand Up @@ -44,9 +44,9 @@ class Controls extends Component {
return (
<div className='controls'>
<div className='colorFunc'>
<label className='controlsHeading' htmlFor='colorFunc'>
Color function
<button className='btnText' onClick={shortNamesOnClick}>
<label className='controlsHeading deprecated' htmlFor='colorFunc'>
[deprecated] Color function
<button className='btnText deprecated' onClick={shortNamesOnClick}>
{useShortNames ? 'Use full names' : 'Use short names' }
</button>
</label>
Expand Down
11 changes: 11 additions & 0 deletions src/components/DeprecationNotice/DeprecationNotice.css
@@ -0,0 +1,11 @@
.deprecation {
background-color: #ffd000;
background-image: repeating-linear-gradient(
-50deg, transparent, transparent 40px,
rgba(255,255,255,.15) 40px,
rgba(255,255,255,.15) 80px
);
box-sizing: border-box;
padding: 0.6rem 1rem;
width: 100%;
}
12 changes: 12 additions & 0 deletions src/components/DeprecationNotice/DeprecationNotice.js
@@ -0,0 +1,12 @@
import React from 'react';
import './DeprecationNotice.css';

const DeprecationNotice = () => (
<div className='deprecation'>
<b>* Note:</b> the CSS color function here is deprecated. New functions are in
the works. When a spec is available we’ll get this site updated.
See <a href="https://github.com/w3c/csswg-drafts/issues/3187#issuecomment-499126198">this Github issue</a> for background.
</div>
);

export default DeprecationNotice;
3 changes: 3 additions & 0 deletions src/components/DeprecationNotice/index.js
@@ -0,0 +1,3 @@
import DeprecationNotice from './DeprecationNotice';

export default DeprecationNotice;
5 changes: 5 additions & 0 deletions src/index.css
Expand Up @@ -66,6 +66,11 @@ a:focus,
padding: 0.2rem 0;
}

.btnText.deprecated {
border-bottom-color: #dedede;
color: #c6c6c6;
}

label .btnText {
margin-left: 1rem;
position: relative;
Expand Down

1 comment on commit f90d5ea

@vercel
Copy link

@vercel vercel bot commented on f90d5ea Oct 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.