Skip to content

Commit 5918494

Browse files
committed
feat: add 'c-' prefix to css classes
1 parent 8e9bb99 commit 5918494

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+416
-389
lines changed

src/components/Alert/CAlert.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ export default {
2525
},
2626
computed: {
2727
classObject () {
28-
return ['alert',
28+
return ['c-alert',
2929
{
30-
'alert-dismissible': this.dismissible,
31-
[`alert-${this.variant}`]: this.variant
30+
'c-alert-dismissible': this.dismissible,
31+
[`c-alert-${this.variant}`]: this.variant
3232
}
3333
]
3434
}

src/components/Badge/CBadge.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ export default {
2323
const tag = !props.href && !props.to ? props.tag : CLink
2424
const domProps = props.textHtml ? { innerHTML: props.textHtml } : null
2525
const componentData = {
26-
staticClass: 'badge',
26+
staticClass: 'c-badge',
2727
class: [
28-
`badge-${props.variant}`,
28+
`c-badge-${props.variant}`,
2929
{
30-
'badge-pill': Boolean(props.pill),
30+
'c-badge-pill': Boolean(props.pill),
3131
active: props.active,
3232
disabled: props.disabled
3333
}

src/components/Button/CButton.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ function isToggle (props) {
3838
3939
function computeClasses (props) {
4040
return [
41-
`btn-${props.variant}`,
42-
props.pill ? 'btn-pill' : props.square ? 'btn-square' : '',
41+
`c-btn-${props.variant}`,
42+
props.pill ? 'c-btn-pill' : props.square ? 'c-btn-square' : '',
4343
{
44-
[`btn-${props.size}`]: Boolean(props.size),
45-
[`btn-ghost-${props.variant}`]: props.ghost,
46-
'btn-block': props.block,
47-
disabled: props.disabled,
44+
[`c-btn-${props.size}`]: Boolean(props.size),
45+
[`c-btn-ghost-${props.variant}`]: props.ghost,
46+
'c-btn-block': props.block,
47+
'c-disabled': props.disabled,
4848
active: props.pressed
4949
}
5050
]
@@ -86,7 +86,7 @@ export default {
8686
}
8787
const domProps = children ? '' : { innerHTML: props.textHtml }
8888
const componentData = {
89-
staticClass: 'btn',
89+
staticClass: 'c-btn',
9090
class: computeClasses(props),
9191
props: computePassedProps(props),
9292
attrs: computeAttrs(props, data, isButton, toggle),

src/components/Button/CButtonClose.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default {
1010
},
1111
buttonClasses: {
1212
type: String,
13-
default: 'close'
13+
default: 'c-close'
1414
}
1515
},
1616
render (h, { data, props, slots }) {

src/components/Button/CButtonGroup.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export default {
1212
'div',
1313
mergeData(data, {
1414
class: [
15-
!props.vertical ? 'btn-group' : 'btn-group-vertical',
16-
{ [`btn-group-${props.size}`] : Boolean(props.size) }
15+
!props.vertical ? 'c-btn-group' : 'c-btn-group-vertical',
16+
{ [`c-btn-group-${props.size}`] : Boolean(props.size) }
1717
],
1818
attrs: {
1919
role: 'group'

src/components/Button/CButtonToolbar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ export default {
1111
'div',
1212
mergeData(data, {
1313
class: [
14-
'btn-toolbar',
15-
props.justify ? 'justify-content-between' : ''
14+
'c-btn-toolbar',
15+
props.justify ? 'c-justify-content-between' : ''
1616
],
1717
attrs: {
1818
role: 'toolbar'

src/components/Callout/CCallout.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template functional>
2-
<div :class="`callout ${props.variant ? 'callout-' + props.variant : ''}`">
2+
<div :class="`callout ${props.variant ? 'c-callout-' + props.variant : ''}`">
33
<slot></slot>
44
</div>
55
</template>

src/components/Card/CCard.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ export default {
3838
return h(
3939
props.tag || 'div',
4040
mergeData(data, {
41-
staticClass: 'card',
41+
staticClass: 'c-card',
4242
class: {
43-
[`text-${props.align}`]: Boolean(props.align),
44-
[`bg-${props.variant}`]: Boolean(props.variant),
45-
[`border-${props.borderVariant}`]: Boolean(props.borderVariant),
46-
[`text-${props.textVariant}`]: Boolean(props.textVariant)
43+
[`c-text-${props.align}`]: Boolean(props.align),
44+
[`c-bg-${props.variant}`]: Boolean(props.variant),
45+
[`c-border-${props.borderVariant}`]: Boolean(props.borderVariant),
46+
[`c-text-${props.textVariant}`]: Boolean(props.textVariant)
4747
}
4848
}),
4949
[ header, body, footer ]

src/components/Card/CCardBody.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ export default {
3131
3232
if (props.title) {
3333
cardTitle = h(props.titleTag, {
34-
staticClass: 'card-title',
34+
staticClass: 'c-card-title',
3535
domProps: { innerHTML: props.titleHtml }
3636
})
3737
}
3838
3939
if (props.subtitle) {
4040
cardSubtitle = h(props.subtitleTag, {
41-
staticClass: 'card-subtitle mb-2 text-muted',
41+
staticClass: 'c-card-subtitle c-mb-2 c-text-muted',
4242
domProps: { innerHTML: props.subtitleHtml }
4343
})
4444
}
@@ -53,14 +53,14 @@ export default {
5353
return h(
5454
props.tag || 'div',
5555
mergeData(data, {
56-
staticClass: 'card-body',
56+
staticClass: 'c-card-body',
5757
class: [
5858
{
59-
'card-img-overlay': props.overlay,
60-
[`bg-${props.variant}`]: Boolean(props.variant),
61-
[`border-${props.borderVariant}`]: Boolean(props.borderVariant),
62-
[`text-${props.textVariant}`]: Boolean(props.textVariant),
63-
[`text-${props.align}`]: Boolean(props.align)
59+
'c-card-img-overlay': props.overlay,
60+
[`c-bg-${props.variant}`]: Boolean(props.variant),
61+
[`c-border-${props.borderVariant}`]: Boolean(props.borderVariant),
62+
[`c-text-${props.textVariant}`]: Boolean(props.textVariant),
63+
[`c-text-${props.align}`]: Boolean(props.align)
6464
}
6565
]
6666
}),

src/components/Card/CCardFooter.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ export default {
1717
return h(
1818
props.tag || 'footer',
1919
mergeData(data, {
20-
staticClass: 'card-footer',
20+
staticClass: 'c-card-footer',
2121
class: [
2222
{
23-
[`text-${props.align}`]: Boolean(props.align),
24-
[`bg-${props.variant}`]: Boolean(props.variant),
25-
[`border-${props.borderVariant}`]: Boolean(props.borderVariant),
26-
[`text-${props.textVariant}`]: Boolean(props.textVariant)
23+
[`c-text-${props.align}`]: Boolean(props.align),
24+
[`c-bg-${props.variant}`]: Boolean(props.variant),
25+
[`c-border-${props.borderVariant}`]: Boolean(props.borderVariant),
26+
[`c-text-${props.textVariant}`]: Boolean(props.textVariant)
2727
}
2828
]
2929
}),

0 commit comments

Comments
 (0)