Skip to content

atomic-css major refactor! Please Review. Fixes #17 #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
dist-newstyle
node_modules
Session.vim
dist
.DS_Store
tags
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Revision history for web-view
# Revision history for atomic-css

## 0.7.0

Expand Down
24 changes: 24 additions & 0 deletions DELETEME.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

OK, so....

hover needs to work with multiple classes:
=> hover (bg Green <> color Red)

but overriding selectors needs to work in a sane way
-- use a monadic bind?
-- this sure looks like one!
setSelector $ \this $ a |> b >> this

-- they don't have to be directly serializable
-- they could be functions!

bg Green => {bg-green}
hover (bg Green) => \sel -> sel ': "hover"


-- I like the new stuff. Now you can't do setSelector (placeholder "woot")


Ok ok ok ... so... selector...


32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Web View
Atomic CSS
============

[![Hackage](https://img.shields.io/hackage/v/web-view.svg)][hackage]
[![Hackage](https://img.shields.io/hackage/v/atomic-css.svg)][hackage]

Type-safe HTML and CSS with intuitive layout and composable styles. Inspired by Tailwindcss and Elm-UI

Expand Down Expand Up @@ -73,28 +73,28 @@ el (width 100 . media (MinWidth 800) (width 400))

### Try Example Project with Nix

If you want to get a feel for web-view without cloning the project run `nix run github:seanhess/web-view` to run the example webserver locally
If you want to get a feel for atomic-css without cloning the project run `nix run github:seanhess/atomic-css` to run the example webserver locally

Import Flake
------------

You can import this flake's overlay to add `web-view` to `overriddenHaskellPackages` and which provides a ghc966 and ghc982 package set that satisfy `web-view`'s dependencies.
You can import this flake's overlay to add `atomic-css` to `overriddenHaskellPackages` and which provides a ghc966 and ghc982 package set that satisfy `atomic-css`'s dependencies.

```nix
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
web-view.url = "github:seanhess/web-view"; # or "path:/path/to/cloned/web-view";
atomic-css.url = "github:seanhess/atomic-css"; # or "path:/path/to/cloned/atomic-css";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, web-view, flake-utils, ... }:
outputs = { self, nixpkgs, atomic-css, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ web-view.overlays.default ];
overlays = [ atomic-css.overlays.default ];
};
haskellPackagesOverride = pkgs.overriddenHaskellPackages.ghc966.override (old: {
overrides = pkgs.lib.composeExtensions (old.overrides or (_: _: { })) (hfinal: hprev: {
Expand All @@ -104,7 +104,7 @@ You can import this flake's overlay to add `web-view` to `overriddenHaskellPacka
in
{
devShells.default = haskellPackagesOverride.shellFor {
packages = p: [ p.web-view ];
packages = p: [ p.atomic-css ];
};
}
);
Expand All @@ -116,16 +116,16 @@ Local Development

### Recommended ghcid command

If you want to work on both the web-view library and example code, this `ghcid` command will run and reload the examples server as you change any non-testing code.
If you want to work on both the atomic-css library and example code, this `ghcid` command will run and reload the examples server as you change any non-testing code.

```
ghcid --command="cabal repl exe:example lib:web-view" --run=Main.main --warnings --reload=./embed/preflight.css
ghcid --command="cabal repl exe:example lib:atomic-css" --run=Main.main --warnings --reload=./embed/preflight.css
```

If you want to work on the test suite, this will run the tests each time any library code is changed.

```
ghcid --command="cabal repl test lib:web-view" --run=Main.main --warnings --reload=./embed/preflight.css
ghcid --command="cabal repl test lib:atomic-css" --run=Main.main --warnings --reload=./embed/preflight.css
```

### Nix
Expand All @@ -136,7 +136,7 @@ ghcid --command="cabal repl test lib:web-view" --run=Main.main --warnings --relo
- `nix run .#ghc966-example` to start the example project with GHC 9.6.6
- `nix develop` or `nix develop .#ghc982-shell` to get a shell with all dependencies installed for GHC 9.8.2.
- `nix develop .#ghc966-shell` to get a shell with all dependencies installed for GHC 9.6.6.
- `nix build`, `nix build .#ghc982-web-view` and `nix build .#ghc966-web-view` builds the library with the `overriddenHaskellPackages`
- `nix build`, `nix build .#ghc982-atomic-css` and `nix build .#ghc966-atomic-css` builds the library with the `overriddenHaskellPackages`
- If you want to import this flake, use the overlay
- `nix flake update nixpkgs` will update the Haskell package sets and development tools

Expand Down Expand Up @@ -165,15 +165,15 @@ Learn More
----------

View Documentation on [Hackage][hackage]
* https://hackage.haskell.org/package/web-view
* https://hackage.haskell.org/package/atomic-css

View on Github
* https://github.com/seanhess/web-view
* https://github.com/seanhess/atomic-css

View [Examples](https://github.com/seanhess/web-view/blob/latest/example/app/Main.hs)
View [Examples](https://github.com/seanhess/atomic-css/blob/latest/example/app/Main.hs)


[hackage]: https://hackage.haskell.org/package/web-view
[hackage]: https://hackage.haskell.org/package/atomic-css


Contributors
Expand Down
191 changes: 0 additions & 191 deletions Session.vim

This file was deleted.

Loading
Loading