8000 Retrait de SASS by Ash-Crow · Pull Request #353 · numerique-gouv/sites-faciles · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Retrait de SASS #353

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

Merged
merged 1 commit into from
Jun 18, 2025
Merged
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
6 changes: 0 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,6 @@ Le projet utilise [Le Système de design de l’État](https://www.systeme-de-de

Il est donc nécessaire d’utiliser autant que possible les classes spécifiques au Système de design de l’État dans le HTML.

Le CSS est écrit dans des fichiers `.sass` et compilé via la commande

```sh
make sass
```

## Traduction : À propos des fichiers `.po` et `.mo`

Ce project utilise le [système de traduction de Django](https://docs.djangoproject.com/en/dev/topics/i18n/translation/).
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RUN poetry install --no-root

COPY --chown=app:app . .

RUN poetry run python manage.py collectstatic --no-input --ignore=*.sass
RUN poetry run python manage.py collectstatic --no-input

RUN chown 1000:1000 -R /app
USER app
Expand Down
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,13 @@ web-prompt:

.PHONY: collectstatic
collectstatic:
$(EXEC_CMD) $(POETRY_CMD) python manage.py collectstatic --noinput --ignore=*.sass
$(EXEC_CMD) $(POETRY_CMD) python manage.py collectstatic --noinput

.PHONY: messages
messages:
$(EXEC_CMD) $(POETRY_CMD) django-admin makemessages -l fr --ignore=manage.py --ignore=config --ignore=medias --ignore=__init__.py --ignore=setup.py --ignore=staticfiles
$(EXEC_CMD) $(POETRY_CMD) django-admin makemessages -d djangojs -l fr --ignore=config --ignore=medias --ignore=staticfiles

.PHONY: sass
sass:
$(EXEC_CMD) $(POETRY_CMD) python manage.py compilescss
make collectstatic

.PHONY: quality
quality:
$(EXEC_CMD) ruff check .
Expand Down
2 changes: 0 additions & 2 deletions ONBOARDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ pipx ensurepath
pipx install poetry
```

Note : `sass` est appelé via [libsass](https://sass.github.io/libsass-python/) et il ne devrait donc pas y avoir besoin d’installer `ruby-sass`.

### Cloner le dépôt

```sh
Expand Down
7 changes: 0 additions & 7 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
"django.contrib.staticfiles",
"widget_tweaks",
"dsfr",
"sass_processor",
"content_manager",
"blog",
"events",
Expand Down Expand Up @@ -217,7 +216,6 @@ def show_toolbar(request):
STATICFILES_FINDERS = [
"django.contrib.staticfiles.finders.FileSystemFinder",
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
"sass_processor.finders.CssFinder",
]

# S3 uploads & MEDIA CONFIGURATION
Expand Down Expand Up @@ -247,11 +245,6 @@ def show_toolbar(request):
MEDIA_URL = "medias/"
MEDIA_ROOT = os.path.join(BASE_DIR, os.getenv("MEDIA_ROOT", ""))

# Django Sass
SASS_PROCESSOR_ROOT = os.path.join(BASE_DIR, "static/css")
SASS_PROCESSOR_AUTO_INCLUDE = False
SASS_OUTPUT_STYLE = "compressed"

STATIC_URL = "static/"
STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles")

Expand Down
2 changes: 1 addition & 1 deletion content_manager/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def test_footer_description_uses_conf(self):
class MenusTestCase(WagtailPageTestCase):
@classmethod
def setUpTestData(cls) -> None:
call_command("collectstatic", "--ignore=*.sass", interactive=False)
call_command("collectstatic", interactive=False)
call_command("create_starter_pages")

def setUp(self) -> None:
Expand Down
2 changes: 1 addition & 1 deletion forms/tests/test_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class FormsTestCase(WagtailPageTestCase):
@classmethod
def setUpTestData(cls) -> None:
call_command("collectstatic", "--ignore=*.sass", interactive=False)
call_command("collectstatic", interactive=False)
call_command("create_starter_pages")

def test_form_page_is_renderable(self):
Expand Down
33 changes: 1 addition & 32 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ dependencies = [
"python-dotenv<2.0.0,>=1.0.0",
"dj-database-url<3.0.0,>=2.1.0",
"gunicorn (>=23.0.0,<24.0.0)",
"django-sass-processor<2.0,>=1.3",
"libsass<1.0.0,>=0.22.0",
"dj-static<1.0.0,>=0.0.6",
"wagtailmenus<5.0,>=4.0",
"wagtail-modeladmin<3.0.0,>=2.0.0",
Expand Down
88 changes: 87 additions & 1 deletion static/css/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,87 @@
.fr-header__service-title em{font-weight:lighter}.cmsfr-block-text p:empty{display:none}.cmsfr-hero{background-size:cover;background-position:center;background-repeat:no-repeat}.cmsfr-hero-large{display:flex;justify-content:center;align-items:center;text-align:center}.cmsfr-background-dark h1,.cmsfr-background-dark p,.cmsfr-background-dark ul{color:white}:root[data-fr-theme=light] .cmsfr-background-dark .fr-btn--secondary{background-color:rgba(255,255,255,0.3)}.cmsfr-author_card__header{flex:0 0 6rem !important;width:6rem !important}.cmsfr-author-img{border-radius:50%;height:4.5rem !important;margin:1.5rem;width:4.5rem}.cmsfr-vertical_contact_card__header{background:var(--background-default-grey)}.cmsfr-vertical_contact_card-img{border-radius:50%;height:100%;width:100%;margin:auto;max-width:50%;aspect-ratio:initial !important}.cmsfr-block-stepper dd{padding-left:0}.cmsfr-stepper__details{display:inherit;margin-top:1rem;width:100%}.cmsfr-footer__bottom-extra{border-left:1px solid var(--border-default-grey);padding-left:1em;margin-left:1em}.cmsfr-display__inline{display:inline}@media all and (max-width: 575px){.cmsfr-order__2{order:2}}
/*** Fixes to the DSFR classes ***/

.fr-header__service-title em {
font-weight: lighter
}

/*** Prefix the classes defined here with cmsfr- ***/

/* cf. https://github.com/wagtail/wagtail/issues/4431 */
.cmsfr-block-text p:empty {
display: none
}

.cmsfr-hero {
background-size: cover;
background-position: center;
background-repeat: no-repeat
}

.cmsfr-hero-large {
display: flex;
justify-content: center;
align-items: center;
text-align: center
}

.cmsfr-background-dark h1,
.cmsfr-background-dark p,
.cmsfr-background-dark button,
.cmsfr-background-dark ul {
color: white
}

:root[data-fr-theme=light] .cmsfr-background-dark .fr-btn--secondary {
background-color: rgba(255, 255, 255, 0.3)
}

.cmsfr-author_card__header {
flex: 0 0 6rem !important;
width: 6rem !important
}

.cmsfr-author-img {
border-radius: 50%;
height: 4.5rem !important;
margin: 1.5rem;
width: 4.5rem
}

.cmsfr-vertical_contact_card__header {
background: var(--background-default-grey)
}

.cmsfr-vertical_contact_card-img {
border-radius: 50%;
height: 100%;
width: 100%;
margin: auto;
max-width: 50%;
aspect-ratio: initial !important
}

.cmsfr-block-stepper dd {
padding-left: 0
}

.cmsfr-stepper__details {
display: inherit;
margin-top: 1rem;
width: 100%
}

.cmsfr-footer__bottom-extra {
border-left: 1px solid var(--border-default-grey);
padding-left: 1em;
margin-left: 1em
}

.cmsfr-display__inline {
display: inline
}

@media all and (max-width: 575px) {
.cmsfr-order__2 {
order: 2
}
}
9 changes: 0 additions & 9 deletions static/css/style.css.map

This file was deleted.

70 changes: 0 additions & 70 deletions static/css/style.sass

This file was deleted.

6 changes: 2 additions & 4 deletions templates/base.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load i18n static dsfr_tags wagtailuserbar wagtail_dsfr_tags sass_tags %}
{% load i18n static dsfr_tags wagtailuserbar wagtail_dsfr_tags %}

<!DOCTYPE html>
<html lang="{% get_current_language as LANGUAGE_CODE %}{{ LANGUAGE_CODE }}"
Expand Down Expand Up @@ -27,9 +27,7 @@
<link href="{% static 'dsfr/dist/utility/utility.min.css' %}"
rel="stylesheet"
type="text/css" />
<link href="{% sass_src 'css/style.sass' %}"
rel="stylesheet"
type="text/css" />
<link href="{% static 'css/style.css' %}" rel="stylesheet" type="text/css" />

{% block extra_css %}
{% endblock extra_css %}
Expand Down
0