Skip to content
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

Move inline styling to style.css #22

Open
rlenferink opened this issue Jul 17, 2022 · 0 comments
Open

Move inline styling to style.css #22

rlenferink opened this issue Jul 17, 2022 · 0 comments

Comments

@rlenferink
Copy link
Member

rlenferink commented Jul 17, 2022

The Celix documentation has high-resolution images which are embedded in its documentation. To ensure that the layout of the website is still okay bootstrap has a .img-fluid class available. That class scales well on different devices (computers, but also phones).

Because the included Celix documentation is written in Markdown a class for an image cannot be defined and every image as part of the card-body is given the same properties as img-fluid and making it work on multiple devices.

I am not sure why defining these CSS selectors work when they are defined as <style>...</style> in the layout, but don't work when moving them to the style.css file.

See

<style>
/* TODO: Ideally the styling below will be moved to the style.css. That doesn't seem to work and needs investigating */
/* Redefine .img-fluid (bootstrap element) for all images, to allow defining images in markdown which do no 'escape' their card */
.card-body img {
max-width: 100%;
width: 100%;
height: auto;
}
/* Allow defining captions for images (will be italic and underlined) */
.card-body img + em {
text-decoration: underline;
}
</style>

When this works, the raw <img/> HTML tag can also be converted to Markdown on the development workflow page:

<img src="development-workflow.png" class="img-fluid" alt="Celix development workflow">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant