-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make dark colours more vivid in order to meet WCAG AA contrast.
- Loading branch information
Showing
7 changed files
with
108 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Example MarkDown Document | ||
|
||
## Heading two | ||
|
||
Not much to see here. | ||
|
||
Except some ~~deleted text~~ using the [CommonMark](https://commonmark.org/) | ||
flavour. | ||
|
||
## Python code example | ||
|
||
This is a simple Python code example: | ||
```python | ||
class MyClass: | ||
"An uncomplicated class." | ||
|
||
def __init__(self): | ||
pass | ||
``` | ||
|
||
### Heading three | ||
That's it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import pytest | ||
|
||
from falconry_pygments_theme.dark import Colors | ||
from falconry_pygments_theme.dark import FalconryDarkStyle | ||
|
||
_color_names = sorted(name for name in dir(Colors) if not name.startswith('_')) | ||
|
||
|
||
@pytest.mark.parametrize('color_name', _color_names) | ||
def test_contrast(contrast, color_name): | ||
value = getattr(Colors, color_name) | ||
if value != FalconryDarkStyle.background_color: | ||
assert contrast(value, FalconryDarkStyle.background_color) >= 'AA' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
import pytest | ||
|
||
from falconry_pygments_theme.light import Colors | ||
from falconry_pygments_theme.light import FalconryLightStyle | ||
|
||
|
||
_color_names = sorted( | ||
name | ||
for name in dir(Colors) | ||
if not (name.startswith('_') or name == 'light') | ||
) | ||
_color_names = sorted(name for name in dir(Colors) if not name.startswith('_')) | ||
|
||
|
||
@pytest.mark.parametrize('color_name', _color_names) | ||
def test_contrast(contrast, color_name): | ||
value = getattr(Colors, color_name) | ||
assert contrast(value, Colors.light) >= 'AA' | ||
if value != FalconryLightStyle.background_color: | ||
assert contrast(value, FalconryLightStyle.background_color) >= 'AA' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[tox] | ||
|
||
envlist = ruff, py | ||
|
||
[testenv] | ||
deps = | ||
pytest | ||
commands = | ||
pytest -v tests/ [] | ||
|
||
[testenv:ruff] | ||
deps = | ||
ruff | ||
skip_install = True | ||
commands = | ||
ruff check | ||
ruff format --check |