Skip to content

Commit ec10021

Browse files
committed
a11y page structure: olh aside h2 to side-info h3
1 parent a3034e6 commit ec10021

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
from django.db import migrations
2+
from customstyling.utils import find_and_handle_custom_stylesheets
3+
4+
5+
def forward_migration(apps, schema_editor):
6+
changes_to_make = [
7+
('olh', '#content aside h2', '#content aside h3'),
8+
('olh', '#content aside', '#content .side-info'),
9+
]
10+
find_and_handle_custom_stylesheets(apps, schema_editor, changes_to_make, reverse=False)
11+
12+
13+
def reverse_migration(apps, schema_editor):
14+
changes_to_make = [
15+
('olh', '#content .side-info h2', '#content .side-info h3'),
16+
('olh', '#content aside', '#content .side-info'),
17+
]
18+
find_and_handle_custom_stylesheets(apps, schema_editor, changes_to_make, reverse=True)
19+
20+
21+
class Migration(migrations.Migration):
22+
23+
dependencies = [
24+
('customstyling', '0002_upgrade_materialize'),
25+
]
26+
27+
operations = [
28+
migrations.RunPython(
29+
forward_migration,
30+
reverse_code=reverse_migration,
31+
)
32+
]

0 commit comments

Comments
 (0)