How can I reduce the font size in Article boxes

Dear Cern Drupal Community,

How can I reduce the font size in Article boxes (I want that the whole name is displayed without “…”)?

Thank you in advance.

Best regards,
Valentina

Hi Valentina,

It can be done only by using the CERN override theme and add CSS for the new font-size of the Articles.

Dear Sotirios,

Thank you for your quick reply.

I tried to add CSS, however the Article boxes are placed in a landing page and there it is not allowed to switch to the HTML code. Do you think that only uploading the CERN override theme can I finally modify the code?

I looked for instructions about the the CERN override theme and I found this: Override the CERN theme | Drupal @ CERN

However, the links (e.g. Page not found | IT Department (cern.ch) ) are not updated.

Thank you in advance for your further help.

Cheers,
Valentina

Hi Valentina,

You can only add your own CSS code if you use the CERN override theme.

I have updated the broken link in the tutorial. The correct one is this File Access

In order to find the class or id of the element to modify use the inspect functionality of your browser and hover over the element. You can apply your CSS there and if you see that it works then add it in the override theme.

Dear Sotirios,

I finally was able to add some attributes on the CSS, however the “…” on the boxes remain. I think it’s not a CSS issue, but a length limit with the Article box titles. Do you know if it is possible to modify the settings of the Article box?

Thank you in advance for your time.

Cheers,
Valentina

Dear Valentina,

You can change the font-size with CSS but not the … The character length of that field is set to 70 in the component’s template. You need to override the template in order to change that and I wouldn’t recommend it.

If you override the component you won’t be able to receive automated updates for this anymore, you won’t get support if something breaks and finally I am sure that it will break the theme.

I remember we had this issue back when we were designing the theme and we found that the ideal character limit is 70 for the specific fonts and font size.