Closed Bug 11520 Opened 25 years ago Closed 15 years ago

Ability to view stylesheet source.

Categories

(SeaMonkey :: UI Design, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: CodeMachine, Assigned: jag+mozilla)

References

(Blocks 1 open bug)

Details

This is a request to be able to view stylesheets like you currently can view
markup with page source.  It is complementary and as far as I can see, distinct
to bug #6782.

At the moment, I can't see any way to browse stylesheet source within the
browser.  If you try to view the page it tries to download it, and there's no
"view as text" command (but that's another SPR).  This would always be a kludge
anyway, even if it worked.

It'd be nice if on any page you had a submenu to be able to view the source of
the current relevant stylesheets, eg

View
----

...
---
Page Source
Page StyleSheets >
   Current Author Stylesheet
   Current User Stylesheet
   Browser Stylesheet
   ---
   ... List Of Author Stylesheets ...
   ---
   ... List Of User Stylesheets ...
Page Info

The resultant stylesheet should be viewed like with "Page Source", coloured and
hyperlinkified (bug #11519).
Summary: Ability to view stylesheet source. → [RFE] Ability to view stylesheet source.
Target Milestone: M14
Move to M20.
Implementing the suggestions in bug 11519 would provide access to style sheet 
source code without cluttering the View menu.
Move to "Future" milestone.
Target Milestone: M20 → Future
A friendlier way than in the source code would be through linkifying the links 
in the Links tab of the Document Info window
<http://critique.net.nz/project/mozilla/general/components/info/>.
Nominating for Mozilla 1.0.
Keywords: mozilla1.0
Since Don has left, Vishy is taking his bugs in bulk, pending reassignment.
thanks,
	Vishy
Assignee: don → vishy
nav triage team:

Would be nice to have, but won't get to this for beta1, marking nsbeta1-
Keywords: nsbeta1-
QA Contact: don → sairuh
ben
Assignee: vishy → ben
View page info currently shows additional tabs for images (with a preview) and
for forms. I think this would be a good place to allow viewing of attached style
sheets. Maybe linked javascript files too.
Status: NEW → ASSIGNED
Priority: P3 → P5
mass moving open bugs pertaining to view source to pmac@netscape.com as qa contact.

to find all bugspam pertaining to this, set your search string to
"ItsSharkeysNight".
QA Contact: sairuh → pmac
*** Bug 139733 has been marked as a duplicate of this bug. ***
There are several bookmarklets that let you view the style sheets on a page. 
Here's a simple one:
http://www.squarefree.com/bookmarklets/webdevel.html#view_style_sheets
Keywords: mozilla1.0mozilla1.2
Summary: [RFE] Ability to view stylesheet source. → Ability to view stylesheet source.
Using 2002120213 OS/2 trunk I went to
http://www.squarefree.com/bookmarklets/webdevel.html#view_style_sheets and
dragged the bookmarklet javascript:s=document.getElementsByTagName('STYLE');
ex=document.getElementsByTagName('LINK'); d=window.open().document; /*set base
href*/d.open();d.close(); b=d.body; function trim(s){return s.replace(/^\s*\n/,
'').replace(/\s*$/, ''); }; function iff(a,b,c){return b?a+b+c:'';}function
add(h){b.appendChild(h);} function makeTag(t){return document.createElement(t);}
function
makeText(tag,text){t=makeTag(tag);t.appendChild(document.createTextNode(text));
return t;} add(makeText('style', 'iframe{width:100%;height:18em;border:1px
solid;')); add(makeText('h3', d.title='Style sheets in ' + location.href));
for(i=0; i<s.length; ++i) { add(makeText('h4','Inline style sheet'  + iff('
title="',s[i].title,'"'))); add(makeText('pre', trim(s[i].innerHTML))); } for
(i=0; i<ex.length; ++i) { rs=ex[i].rel.split(' '); for(j=0;j<rs.length;++j) if
(rs[j].toLowerCase()=='stylesheet') { add(makeText('h4','link rel="' + ex[i].rel
+ '" href="' + ex[i].href + '"' + iff(' title="',ex[i].title,'"')));
iframe=makeTag('iframe'); iframe.src=ex[i].href; add(iframe); break; } } void 0 

to the personal toolbar. Next I went to
http://www.newscientist.com/hottopics/tech/techindex.jsp?sub=Nanotechnology,
after which I clicked the bookmarklet and Mozilla crashed, leaving the following
each time (twice tried):

12-03-2002  02:23:15  SYS3175  PID 0044  TID 0001  Slot 0074
H:\MOZILLA\BIN\MOZILLA.EXE
c0000005
1de24729
P1=00000001  P2=00000000  P3=XXXXXXXX  P4=XXXXXXXX  
EAX=00000000  EBX=00000000  ECX=0012dd7c  EDX=0012dd78
ESI=00000001  EDI=0012dd78  
DS=0053  DSACC=f0f3  DSLIM=ffffffff  
ES=0053  ESACC=f0f3  ESLIM=ffffffff  
FS=150b  FSACC=00f3  FSLIM=00000030
GS=0000  GSACC=****  GSLIM=********
CS:EIP=005b:1de24729  CSACC=f0df  CSLIM=ffffffff
SS:ESP=0053:0012dd2c  SSACC=f0f3  SSLIM=ffffffff
EBP=0012de24  FLG=00012202

NECKO.DLL 0001:00004729

------------------------------------------------------------

12-03-2002  02:29:57  SYS3175  PID 0046  TID 0001  Slot 0074
H:\MOZILLA\BIN\MOZILLA.EXE
c0000005
1de14729
P1=00000001  P2=00000000  P3=XXXXXXXX  P4=XXXXXXXX  
EAX=00000000  EBX=00000000  ECX=0012eb8c  EDX=0012eb88
ESI=00000001  EDI=0012eb88  
DS=0053  DSACC=f0f3  DSLIM=ffffffff  
ES=0053  ESACC=f0f3  ESLIM=ffffffff  
FS=150b  FSACC=00f3  FSLIM=00000030
GS=0000  GSACC=****  GSLIM=********
CS:EIP=005b:1de14729  CSACC=f0df  CSLIM=ffffffff
SS:ESP=0053:0012eb3c  SSACC=f0f3  SSLIM=ffffffff
EBP=0012ec34  FLG=00012202

NECKO.DLL 0001:00004729

I wish someone would fix this bug instead of suggesting broken hoop jumping. I
don't want another browser window open just to view a simple text file.

Looks like keyword needs repair.
*** Bug 189167 has been marked as a duplicate of this bug. ***
*** Bug 239988 has been marked as a duplicate of this bug. ***
Product: Core → Mozilla Application Suite
Assignee: bugs → jag
Status: ASSIGNED → NEW
Priority: P5 → --
QA Contact: pmac
Target Milestone: Future → ---
Now, some add-ons can show CSS source.
Is this feature still needed to be implemented in application ?

Blocks: 455888
QA Contact: ui-design
View Source provides now active links to stylesheets and script files. Following them shows the CSS source. FIXED by other code.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.