I am working on a reactjs app and was looking for editing the font size of some specific text and found the class gx-fs-sm. That should suffice what I need, but I am still trying to understand what the prefix "gx-" stands for. Is it something that can be changed or is much more for not colliding with other frameworks or custom classes that you may already be using ?
Looking over the documentation I did not get to the answer in the time I had and therefore this question. If you have other resource/article that explain succinctly the logic behind, please do share!
As per #LGSon comment, after more digging I found out that the gx- prefix is not an antd design class. The app is build on top of Wieldy custom theme and the class is added by it.
The prefix is declared in /src/styles/global/variables.less.
(Note: While I believe this is trivial for frontend devs, still it is an answer to my question)
Related
I want to make a demo of some sort online study book. I am trying to use bootstrap as a core for my styles but it feels like it's not enough.
What I really like is a bootstrap site itself: getbootstrap.com.
Both of these sidebars with navigation and this fancy header. Plus they have nicer styles for typography:
So I have two question:
1) Am I allowed to use their styles?
2) If so what will be the right way to get those styles? I can see two extra files in the head of the site but I hope that maybe there is a repository or something.
P.S. any other advises are welcome too. Maybe you can recommend framework for online books/documentation or something?
Thanks.
UPD: For those who vote negatively on this question could you please explain why?
I'm not sure if you're directly allowed to use their styles. However, you could always legally obtain a similar template such as
https://guidebook.webuildthemes.com/html/docs/layout-2.html
Alternatively, there are plenty of other free options designed to build documentations and have them customized to suit your design needs. A few of them are listed below:
https://docusaurus.io/docs/en/installation
https://docsify.js.org/#/
https://daux.io/
https://www.mkdocs.org/
I have been trying to find a resource for learning how to develop my own themes for IBM (Lotus) Notes XPage applications and company server defaults, but I have been unable to find a way to do it. I have found plenty of information on how themes work, and I know they are a collection of css that can be server specific and application specific and they can even inherit from one another etc. but I have been unable to actually find the correct naming scheme. Of course I can write my own css and connect the classes etc that I write to a control to change text and background and so on, but as far as I understand the entire point of using a theme is to not have to do this step.
How do I find the proper naming scheme to create my own themes which also support the extension library controls?
thanks in advance!
After spending a great deal of time trying to work out an answer to this question, and with the links that #Naveen wrote in the comments of the question, I feel this question warrants a real answer.
First off, the link to this wiki is great if you are trying to create your own XPage theme. I had found something similar before posting this question. This article which was also listed by Naveen in the comments is also a great source if you are trying to find a way to expand the XPage Theme and need a way to get the control name for the Theme's XML file, however it will NOT work for the Extension Library Controls! This is because at least most, if not all extension library controls rely on dojo, and they use the dojo themes in conjunction with the XPages Theme. There might be a way to turn this off in the controls' All Property tabs, but this is a situation where it might be easier to additionally create a dojo theme yourself.
I feel that the creation of a dojo theme is a question of its own and I do not want to go into it really here, but I will say that there are four default dojo themes which are a bit basic. Upon creation of your own theme, you can import a dojo theme by using the following code:
<resource dojoTheme="true">
<content-type>text/css</content-type>
<href>/.ibmxspres/dojoroot/dijit/themes/tundra/tundra.css</href>
</resource>
and by also using
<control>
<name>ViewRoot</name>
<property mode="concat">
<name>styleClass</name>
<value>body</value>
</property>
<property>
<name>styleClass</name>
<value>tundra</value>
</property>
</control>
where body is your own html-body style and tundra is the dojo theme. This will make sure that the ExtLib controls at the very least have some sort of a style and are not always completely transparent, or have some other unwanted default style.
If you do not wish to write your own style, it is possible to only override a few classes. Finding these classes can be difficult, but they are found both on the server and on the client, and you can reference them. The file will be located in the:
..\Notes\Data\domino\js\dojo-1.5.2\dijit\themes
file. Additionally, you can use firebug or any other browser's inspect element option to find out what css classes are being used for that control. I have found no way to alter the naming scheme, or better put, create your own classes and set the style in the designer and have it make any difference. The only option that I have found is to override the class already given in my css.
I hope this helps any future person.
I know there are several questions concerning unused CSS already, e.g.
How can I find unused images and CSS styles in a website?
or
how can i find unused css in ajax app?
As I understand from these questions and the answers given there it is currently not possible to automatically check for unused CSS for a complete webapp. The problem seems to be that it is nearly impossible to get all HTML that could ever be generated, even if you have access to the source code.
Also note that in my case I want to verify that some CSS is not used rather than finding it in the first place.
Still I guess removing unused CSS is a common task. So how is it done in real-life? I actually have to do this for a larger project. My current plan is to remove some CSS, test it manually and then wait for bug reports. I really hope there is a better way.
Edit: I just realized that this question is not really CSS specific. So when I broadened my search I found What is the best way to remove dead code from your application?. The answer given there mainly says it "is only possible with a really extensive set of tests" (which is not an option for me).
There is no exact solution, but a good workaround I found on css wizardry:
Add something like this to your css:
#suspicious_selector {
background-image: url('/assets/img/dead/suspicious_selector.gif');
}
After some time check for requests to that file. If there were no requests, it is mostly safe to remove the selector.
I'd like to use tooltips with the same design as the error/validation tooltips (rounded box with a tip pointing to the mouse's position).
Given the name "error/validation tooltips", it bothers me to use them as normal tooltips.I haven't found people having the same "principles" issue as myself..
So, is it that bad to use the error/validation tooltips as normal tooltips? And, if yes, what would be the easiest way to re-use its design without rewriting much code?
Hope it's clear enough :) And that you will be able to enlighten me somehow in this matter :)
Regards.
BS_C3
Good or Bad is subjective based on what you're trying to do and the design of your app. There is never a right a wrong answer to stuff like that.
To reuse that design, you have two options that I see.
The first is to set the styleName of your toolTip component to errorTip.
The second is open up the default.css in the Flex Framework directory and copy and paste the CSS for the errorTip into your own CSS file that you then use in your application.
These docs will be good reading on this issue.
Has anybody experience in building a custom style in Qt? What I have in my mind is a complete new style that affects all kind of widgets. I have seen some examples in the web for a custom combo box. But I have no idea how much time and code it takes to build a "complete" new custom style ... maybe someone can give me a hint.
We think of using Qt 4.3 (or even newer) ...
Check out the Stylesheets facility in Qt 4. While it's still a hassle, it's way easier than doing a full-on custom style. You can just adjust one visual facet at a time and try it out.
It pays attention to inheritance. So if you style the font in QWidget, then every visual widget will also use that font. And so on.
I have developed a "new" style that changed the appearance of much of an application. It did take some time, and quite a bit of experimentation. I also derived my style from the generic windows style, to allow it to handle some of the stuff I didn't want to mess with. All told, I think it took me a week to get most of what I wanted, with practically no prior exposure to the styles.
In order to actually develop one, I would get into the source for their styles example, which has a "wood" style. I put my own style in place of the example style, and started changing things while using the example program to check how it looked. Depending on how you are developing it, you might want to have a configuration file so you can easily change some of the values without recompiling.
You might want to look at existing styles. You can find quite a few of them on kde-look.org, in the Styles / 4.0 section.
We've done it in the past (in Qt 3), and it's extremely time-consuming. We had a lot of problems with flickering, redraws not working the way we expected, sluggish behavior, bugs in the Qt implementation. It a lot less straight-forward than it seems, and there's little support or user experience too. Unless you need something really particular (as we did), I'd say it's not worth the trouble.
Other frameworks are supposed to make it easier (some Java-based?), but I don't have first hand experience.
If you don't need to radically change the widget style, you might want to try using widget style sheets:
http://doc.qt.digia.com/4.4/stylesheet.html