January 18, 2017 at 3:18 pm #3286Danny MarkovBootstrap Studio Developer
When you click the “Apply” button (or hit Ctrl/Cmd + S) the Preview is automatically reloaded so you can try out your changes immediately (see our tutorial about Preview and Export for more).
2. WRITING CSS
There are two ways to edit CSS in Bootstrap Studio. The first is to use the Styles tab and edit the styles of the selected component. The other is to create separate CSS files in Design pane and edit them.
2.1 THE STYLES TAB
The bottom part of the window holds two areas – HTML and Styles. HTML gives you a real-time preview of the generated HTML for the page with the ability to select elements, define attributes, IDs and css classes.
The Styles area shows you the applied CSS styles for the HTML elements that you select. This is a quick way to check what styles are active at any given moment, and to easily override default Bootstrap styling.
The Styles tab pulls CSS definitions from Bootstrap’s CSS file, as well as all other CSS files that you create. Note that Bootstrap’s styles are locked – you can’t edit them directly. To change them, you need to Copy them to your own stylesheets.
2.2 CREATING CSS FILES
To do any real CSS editing, you need to create a stylesheet in the Design panel. By default, every new design comes with a styles.css file, but you can create as many files as you wish. Just right click the “Styles” label and choose the create option.
2.3 EDITING CSS
Now that you have a stylesheet file, we can start editing CSS! Double click the file and our CSS editor will pop up.
Click on a selector, css property or a value to edit them. Hit Enter or Tab to move to the next rule, and Shift+Tab to the previous. You can click in between rules to create new ones and in between css blocks to create new blocks with css code (this is not available in the Styles tab).
Images and fonts that you’ve added to the Assets panel will be automatically picked up and shown as suggestions when appropriate.
There is a full undo/redo history, so feel free to experiment!
When you click the three dots on the top right of each CSS block, you will see the menu that is shown above. You can duplicate, toggle media queries and delete entire blocks of CSS from the menu.
Tip: There is a quick way to delete CSS styles. When you focus a css selector, hit the Delete/Backspace key to empty it, and Enter to confirm changes. This will delete the entire block and move on to the next.
3 ADDING CLASSES, IDS AND ATTRIBUTES
Adding your own classes and ids is very important when writing and reusing CSS styles. To do it, click the Attributes panel on the bottom of the HTML tab.
In this panel you can change id and class names, or add additional attributes to elements by clicking the + button at the bottom right.
Note: You can add any CSS class that you wish, but some, like text-left in this picture, are locked. To change locked classes in Bootstrap Studio, you need to modify the component’s settings in the Options panel.
Congrats! You can now create any kind of design imaginable with Bootstrap Studio. Our application makes writing CSS both easy and fun and you will soon dread having to go back to a text editor again.February 24, 2017 at 10:28 am #3877nan wint yeeMember
HelloMarch 3, 2017 at 3:06 pm #3964Bashiir12MemberMarch 10, 2017 at 6:51 am #4062kaybeeIceMember
Hi i have multiple html files created in the bootstrap studio and i also have multiple css file created as well. I would like each html files to have its own unique css file. I don’t want all the html files linking to all the css file. for example, I have two html files(first.html & second.html), i also have two css files(first.css & second.css) i would like to be able to link only the first.css file to the first.html files. I don’t want to open the first.html file to see it having both the first.css and the second.css filelinked to it. How do i get this done?April 23, 2017 at 10:52 am #5059
You are right. In some projects there is a need to have a css and/or a js especially in only one html file, unfortunately there is no direct way inside BSS. But there are some options how you can achieve this, somehow.
- Modify head content in the page property (right click on the particular page)
- Using the export script and modify the html files.
In both ways you have to leave BSS and start another webserver and work with the exported files. In my opinion there is a need for managing dedicated css/js inside BSS. Maybe there is a way that i did not no, so any help would be appreciated.
Regards, AGApril 23, 2017 at 11:26 am #5062marrcoMemberValued
Usually it’s not that huge problem, because scripts are just a few KB, and stay cached, so don’t get (down)loaded multiple times. If you have 2 different type of pages that need different libraries you can set a .class and test for it in your user.js.
different solutions can be found googling for “conditionally load CSS JS and on page name” so that’s not a great problem.
What I sometimes do is just modify index.html before uploading, commenting out a few unused libraries and instead use preconnect (or prefetch, preload o prerender, dns-prefetch or whatever you like). But it’s rarely worth the effort apart from the fact that marketing can tell your customer about advanced optimization techniques.April 23, 2017 at 2:22 pm #5071
i do similar workarounds, like switch statements or patch the html files with my export script. But having the possibility to load explizit a css/js file is, in my opinion, a more elegant way. BSS gives you the possibility to create a lot css/js files, for structure reason, but all are loaded in every html file inside the project, but why (structure is gone) ?
Inside BSS there is already an JS “Include Order Option” maybe there will be a chance to have in this dialog “Include Only In Option”? What do you think?
Regards, AGApril 24, 2017 at 1:09 am #5084JoMember
It’s been discussed periodically in the forums and it looks promising that we may get this feature to be able to assign specific files/scripts/etc. to our pages. Guess we’ll wait and see.
@bashiir12: Get a job and quit whining at the almost non existent price of this app. This is so ridiculously cheap that if you can’t afford it, then you need to be spending your money on more of life’s necessities than worrying about getting software.April 24, 2017 at 2:08 pm #5103
I’ll keep my fingers crossed and be patient 😉 THX for reply …
You must be logged in to reply to this topic.