@@ -51,28 +51,37 @@ const moreFeatures = computed(() => Math.max(meta.features.length - 2, 0))
5151 </div >
5252 </div >
5353 <div class =" rule-details" >
54- <div class =" rule-badges" >
54+ <div class =" rule-badges" >
5555 <Badge v-if =" meta.type === 'Pattern'" type =" info" text =" Simple Pattern Example" />
5656 <template v-else >
57- 📏<span class =" emoji-offset" />
57+ <span title =" Used Rules" >📏</span >
58+ <span class =" emoji-offset" />
5859 <Option
5960 v-for =" rule in displayedRules"
6061 :key =" rule"
6162 :text =" rule"
6263 :highlight =" filter.selectedRuleFilters.includes(rule)"
6364 />
64- <Option v-if =" moreRules" :text =" `+${moreRules}`" />
65+ <Option
66+ v-if =" moreRules"
67+ :text =" `+${moreRules}`"
68+ :data-title =" meta.rules.slice(displayRuleCount).join(', ')"
69+ />
6570 </template >
6671 </div >
6772 <div class =" rule-badges" v-if =" meta.features.length > 0" >
68- 💡
73+ < span title = " Used Features " >💡</ span >
6974 <Option
7075 v-for =" feature in meta.features"
7176 :key =" feature"
7277 :text =" feature"
7378 :highlight =" filter.selectedFeatures.includes(feature)"
7479 />
75- <Option v-if =" moreFeatures" :text =" `+${moreFeatures}`" />
80+ <Option
81+ v-if =" moreFeatures"
82+ :text =" `+${moreFeatures}`"
83+ :data-title =" meta.features.slice(2).join(', ')"
84+ />
7685 </div >
7786 <a :href =" meta.playgroundLink" class =" playground link" target =" _blank" >
7887 Try in Playground →
@@ -162,4 +171,43 @@ a > .VPBadge:hover {
162171.highlight-filter :hover {
163172 color : var (--vp-c-text-2 );
164173}
174+ @media only screen and (min-width : 780px ) {
175+ [data-title ] {
176+ position : relative ;
177+ cursor : help ;
178+ }
179+ [data-title ]::before {
180+ position : absolute ;
181+ left : 5px ;
182+ bottom : -5px ;
183+ width : 0 ;
184+ height : 0 ;
185+ display : block ;
186+ border : 5px solid transparent ;
187+ content : ' ' ;
188+ border-bottom-color : rgba (0 , 0 , 0 , 0.5 );
189+ opacity : 0 ;
190+ transition : 0.2s ;
191+ }
192+
193+ [data-title ]::after {
194+ content : attr (data-title );
195+ position : absolute ;
196+ left : 50% ;
197+ bottom : -5px ;
198+ color : var (--vp-c-white );
199+ background-color : rgba (0 , 0 , 0 , 0.5 );
200+ padding : 0.25em 0.5em ;
201+ font-size : 10px ;
202+ width : max-content ;
203+ transform : translate (-50% , 100% );
204+ transition : 0.2s ;
205+ border-radius : 5px ;
206+ opacity : 0 ;
207+ }
208+
209+ [data-title ]:hover ::after , [data-title ]:hover ::before {
210+ opacity : 1 ;
211+ }
212+ }
165213 </style >
0 commit comments