I just switched to using MUI Material UI, and this is a question about best practices.
How do I get standard MUI styled text throughout my application? Do I need to use Typography everywhere? What about text that I directly render within divs in my components? What about raw header elements?
I guess this also applies to rendering of raw elements like <a>, for example when I use Nav Links from bootstrap (I'm also using react-bootstrap for some components it provides). Is there a way to get the default MUI typography for that?
I know this is a pretty basic question, just want to wrap my head around the best practices when using this library. Thanks!
Related
I am building a multi tenant platform and want to have different logos and styling of the navbar depending on logged in user or some other business rule. How do I do that?
If I want to add widgets on the navbar, for example notification indicator, how do I do that?
An interesting possiblity is to make a component, and that component includes a /style tag that is data-bound. You can also include base64 coded images that is used by the css in your component.
For inserting stuff in the navbar maybe you can use pseudo elements from CSS.
Otherwise I would install a local Turnkey development like this https://wiki.mdriven.net/index.php/Development_in_Visual_Studio. Then you can change any part of the site.
I am having trouble understanding the docs given on the material UI site, for overriding the css styles when using css modules. If there is conflicting styles, i need to use the !important hack to overwrite their styles.
I have tried to follow their suggestion of
css injection order
so that my custom css (using css modules) comes after the material UI css.
The link I have tried to follow is
https://material-ui.com/customization/css-in-js/#css-injection-order
If anyone is able to give me a simple step my step solution of how to do this with a component or a solution using codesandbox it would be very helpful.
Thank you and have a nice day.
I know I can link a style sheet to TinyMCE and this will be used when I am editing. It also seems to apply the styling to the Heading options available in the format dropdown list which is great. I also know I can add custom formats menu using custom_formats (here) but is there a way for the Formats to be populated using my CSS automatically? I have various classes in my CSS for the P tag and would like to allow my users to utilise them.
No, this is not possible (at least not out of the box).
How could a piece of code guess what style or class to use from the pure CSS?
I'd like to display rich text content in my app. I want user to create simple WYSIWYG input with support of bold, italics, shadow, outline, image HTML-like tags. I am puzzled if I should go with UIWebView or custom written UILabel/UIView which can have CoreText framework added to support all those above stated properties. I see there are libraries which are using both approaches.
Does anyone have an experience dealing with these approaches who can suggest cons and pros? Thanks
The web view approach has quite an overhead and likely a delay to display the rendered text. I would recommend using DTCoreText.
I am new to GWT and am having a hard time finding any good tutorials focused especially on teaching styling with GWT. The few examples I've found provided by Google are rather paltry, and don't really explain much.
Some things I'm trying to do would be:
Change the global font style
Change existing widgets' styling, such as the background color of a
selected item in a CellTree
Replace a button's text with an image instead
Remove borders of text fields
the list goes on
I've been searching and searching, and am not finding anything particularly helpful with styling, so any advice/direction would be greatly appreciated! Thank you!
Styling in GWT is done almost entirely with CSS. You can link an ordinary CSS file to your host html, as you would with a normal website, and its rules will apply just as normal CSS does with normal HTML. GWT provides a couple of ways to optimize your CSS, and that gets pretty complicated, but at a basic level you can just use Firebug to look at the HTML of your app, figure out what CSS you need from that, and throw it in your css file. GWT applies many special styles to the widgets that come built-in, and you can learn all of those style names from the generated HTML and the documentation.