Are default or pre-built classes provided in material UI? - material-ui

Does material UI provide pre-built class names like bootstrap does. For example: .pull-right, .pull-left

Material-UI has it's own styling solution, among that one can override it's default css class names.
Take a look here.

Related

How to add a custom Material UI DataGrid (Pro) custom type?

I would like to add a custom type formatter to a DataGrid (Pro). DataGrid manual recommends to simply create a reusable partial column definition and then expand it (link).
But I see code in the DataGrid, and it looks like it supports custom types, but I can't find any documentations on it or find usages.
It looks like useDataGridProComponent method is intended for state management, specifically I can't just pass my columnTypes to it, I have to provide a few dozen different properties that I do not want to change from defaults.
Is it a supported feature? Is there an example of how I can use it?

jquery ui spinner change style of one specific spinner

I want to remove the ui-corner-tr and ui-corner-br classes from one specific spinner with an id of test and a class of testSpinner as an example.
I tried... and many combinations of classes with no luck.
$('.ui-spinner .testSpinner').removeClass('.ui-corner-tr');
$('#test').removeClass('.ui-corner-tr');
Any ideas?
It can be an order issue: maybe the jqueryUI library loads after your code, nullifying it.
(I'm just guessing... You should provide more details).
the removeClass method does not require CSS selector names, just class names.
$('.ui-spinner .testSpinner').removeClass('ui-corner-tr');
$('#test').removeClass('ui-corner-tr');
Reference: https://api.jquery.com/removeclass/

Can i use Tailwind CSS and Material UI in the same Next js project?

If I used both of them, could I run into conflicts? Is this a good approach to use?
It is possible and the MUI team has been resolved it.
From the documentation:
If you are used to Tailwind CSS and want to use it together with the MUI components, you can start by cloning the Tailwind CSS example project. If you use a different framework or already have set up your project.
It is necessary to Remove Tailwind's base directive in favor of the CssBaseline component provided by #mui/material and fix the CSS injection order.
You can read how: https://mui.com/guides/interoperability/#tailwind-css
Yes you can run both ui framework. But it is not a good approach. Every ui framework has the complete solution for designing ui part. Like in tailwind css you can have the JIT compiler for compilation your custom css. Or the other hand MUI has also.
I think you can go through just only on ui framework. I have suggestion for ui. For your next js project you can use-
Tailwind Css
Theme-ui
Thank you.
Definitely, You will be in a big problem because once you initialize a styling library it applies its basic styles to the components so that if you are using more than one styling library you may not be able to change the behavior or styles of the components.
It also leads to rubbish suggestions while adding classes names and so on.
Stick to a UI libray and go with it.If you cant get it using the ui libraray do it yourself using CSS that could be more interesting and you can have more control over the components.
Use Mui base instead of Mui core.
https://mui.com/base/guides/working-with-tailwind-css/
I have tried using Mui and Tailwindcss together and it's not worth it. First, you will have to use Mui/base instead of Mui/material in order to reduce conflicts check https://mui.com/base/guides/working-with-tailwind-css. And if you really need to customize Mui components styled of the sx prop. This is just my opinion.

Liferay 7 Themes and AUI

I am having an issue with Liferay 7 Themes and AUI. First, it is my understanding each Liferay page is divided into sections, as defined here:
- https://dev.liferay.com/es/develop/tutorials/-/knowledge_base/6-2/setting-up-custom-css
And I must wrap any custom css with the appropriate wrapper, as defined in the above link. Any css defined in the theme applies to the appropriate section of the page, for all pages in the web application. I can also create custom wrappers within the theme, which individual portlets may reference using the 'com.liferay.portlet.css-class-wrapper' annotation.
I can therefore change the AUI Button's appearance by creating a css class and referring to it as follows:
< aui:button cssClass="btn-lg".../>
But it is less clear to me how I can apply custom css to AUI Data tables. Guidance is certainly appreciated.
You can use theme contributors.
And there create a .scss file and put customized styles for datatable there like :
.yui3-datatable{
& thead{
backgournd-color: red;
}
}
You can also use 'your-theme/css/custom.csss' to override default style with your custom styles.

SWT Controls with predefined styles

I want to have in my SWT project controls (Button-s, Text-s, etc) with predefined styles. My first idea was to extend for example org.eclipse.swt.widgets.Text class, set some settings and use that new classes instead of original, but get org.eclipse.swt.SWTException: Subclassing not allowed exception. How to do that right ?
You have to override checkSubclass method to do nothing, otherwise it will complain that subclassing not allowed - because usually you shouldn't really override standard components.
#Override
protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components
}
You also should consider building custom widgets containing primitive controls using delegation. For example you can build MyText which will contain Text widget inside with custom setup.
Thing to remember is SWT provides standard controls which looks natively on each on platform. Anyway polishing standard components is still allowed and even a must in production software.
See the SWT Faq for this concern. There you'll find also a link howto write custom widgets