Freeman35 Posted July 3, 2018 Share Posted July 3, 2018 Hello, How can I combine css in new css class name? Example: .Font_name { font-family:Arial; font-weight:bold; font-style:normal; } .Font_ground { background-color: #fff; } .Size_1 { font-size:15px; } .Size_2 { font-size:12px; } how to? .smallest { Font_name, Font_ground, Size_2 } .biggest { Font_name, Font_ground, Size_1 } Thank you Quote Link to comment Share on other sites More sharing options...
mhmda Posted July 4, 2018 Share Posted July 4, 2018 config.cls='Font_name smallest' Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted July 4, 2018 Author Share Posted July 4, 2018 Thank you for answer, config.cls='Font_name smallest' Is this mean rigth code ? .smallest { Font_name, Font_ground, Size_2 } config.cls='Font_name smallest' is this aqual config.cls='Font_name Font_ground Size_2' ? if yes, I wanna incliude bootstrap class into my css block, so I plain optimise my css, for example, .My_border{...} .My_Font{...} My_ground{...} My_Shadow{..}..... will be my style rules. After then .My_Edit{ .My_border, .My_Font } config.cls='My_Edit'; So I'm not write more time "font-family:Arial;........." I hope I can translate my idea Thank you Quote Link to comment Share on other sites More sharing options...
mhmda Posted July 4, 2018 Share Posted July 4, 2018 No no I meant in my post that when using css as class in js you may use multiple css classes with ' ' (space). In css declaration you cannot combine classes as you did. Please refer to css declaration in the internet to be more familiar with it. Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted July 4, 2018 Author Share Posted July 4, 2018 Thank you, I looked for in internet, and maybe in forum can knows, so asked. I'm useing your wrote way, some time I add 4-5 names, I thinked maybe can find short way. regards Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.