Skip to content

Commit 13df736

Browse files
committed
atomic-css major refactor!
classier, stuck on [] wierd solution with catchall list instance and empty list ToCSS major refactor! Class->Rule, Rule+media, new modules done! big improvement on before media separate type removed context wip wip refactoring back simple html definition merge selector coming along, stuck with Html : Html got Html effect to work with funky nested state stuff View with Html (). Stuck as attributes require annotations better factoring of atomic utility classes with property-based overrides! hover, bold external classes promising direction with 2 different operators wip looking good! Just can't do single tags sexy stuck on newtypes / stack layer ModAtts, ModStyles - figured out how to do single tags! moved things into atomic cleanup moving files into place example of using blaze making progress! forced to redefine everything WIP - wait, how would blaze work interesting! external type family, Category Attributes and Styles Working? Moved addAttribute to Attributable stuck - cant figure out how to resolve text reverted IsHtml Working! Wow! Styles [Rule] etc. refactored Styleable refactor Render fixed blaze example, much simpler! improved blaze CSS override rules, tests render tests, pseudo + media> NEEDS: parent? RuleSelector = Custom | FromClass refactoring: Styleable -> CSS, Attributable -> Html, etc render tests merge classes with attribute uniqueRules built in ancestor! Ready to publish atomic-css examples working switched to colon separator PxRem, Length, TRBL tests exports renamed to atomic-css renaming refactor module names refactor names and modules attributes removed web.view more refactors added Styleable to CSS fixed align infinite loop pseudo refactor attributable, styleable (a -> b) exports fixed blaze example slow error: speedup with rule map refactored Html to a list newtype remove Empty
1 parent 8c6ad0a commit 13df736

50 files changed

Lines changed: 3053 additions & 2791 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
dist-newstyle
22
node_modules
3+
Session.vim
34
dist
45
.DS_Store
56
tags

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Revision history for web-view
1+
# Revision history for atomic-css
22

33
## 0.7.0
44

DELETEME.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
OK, so....
3+
4+
hover needs to work with multiple classes:
5+
=> hover (bg Green <> color Red)
6+
7+
but overriding selectors needs to work in a sane way
8+
-- use a monadic bind?
9+
-- this sure looks like one!
10+
setSelector $ \this $ a |> b >> this
11+
12+
-- they don't have to be directly serializable
13+
-- they could be functions!
14+
15+
bg Green => {bg-green}
16+
hover (bg Green) => \sel -> sel ': "hover"
17+
18+
19+
-- I like the new stuff. Now you can't do setSelector (placeholder "woot")
20+
21+
22+
Ok ok ok ... so... selector...
23+
24+

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Web View
1+
Atomic CSS
22
============
33

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

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

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

7474
### Try Example Project with Nix
7575

76-
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
76+
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
7777

7878
Import Flake
7979
------------
8080

81-
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.
81+
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.
8282

8383
```nix
8484
{
8585
inputs = {
8686
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
87-
web-view.url = "github:seanhess/web-view"; # or "path:/path/to/cloned/web-view";
87+
atomic-css.url = "github:seanhess/atomic-css"; # or "path:/path/to/cloned/atomic-css";
8888
flake-utils.url = "github:numtide/flake-utils";
8989
};
9090
91-
outputs = { self, nixpkgs, web-view, flake-utils, ... }:
91+
outputs = { self, nixpkgs, atomic-css, flake-utils, ... }:
9292
flake-utils.lib.eachDefaultSystem (
9393
system:
9494
let
9595
pkgs = import nixpkgs {
9696
inherit system;
97-
overlays = [ web-view.overlays.default ];
97+
overlays = [ atomic-css.overlays.default ];
9898
};
9999
haskellPackagesOverride = pkgs.overriddenHaskellPackages.ghc966.override (old: {
100100
overrides = pkgs.lib.composeExtensions (old.overrides or (_: _: { })) (hfinal: hprev: {
@@ -104,7 +104,7 @@ You can import this flake's overlay to add `web-view` to `overriddenHaskellPacka
104104
in
105105
{
106106
devShells.default = haskellPackagesOverride.shellFor {
107-
packages = p: [ p.web-view ];
107+
packages = p: [ p.atomic-css ];
108108
};
109109
}
110110
);
@@ -116,16 +116,16 @@ Local Development
116116

117117
### Recommended ghcid command
118118

119-
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.
119+
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.
120120

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

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

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

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

@@ -165,15 +165,15 @@ Learn More
165165
----------
166166

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

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

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

175175

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

178178

179179
Contributors

Session.vim

Lines changed: 0 additions & 191 deletions
This file was deleted.

0 commit comments

Comments
 (0)